Use UTF-8 safe return-to encoding and decoding across router and login
Co-Authored-By: Codex <codex@openai.com>
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
import { createRouter, createWebHistory } from "vue-router";
|
||||
import { useLoginStore } from "@/stores/login";
|
||||
import { getCookie, setCookie } from "@/utils/cookieUtil";
|
||||
import { encodeReturnTo } from "@/utils/returnToEncoding";
|
||||
import AuthContainer from "@/views/AuthContainer.vue";
|
||||
import MainContainer from "@/views/MainContainer.vue";
|
||||
import Login from "@/views/Login/LoginPage.vue";
|
||||
@@ -182,7 +183,7 @@ function buildLoginRedirect(fullPath: string) {
|
||||
return {
|
||||
path: "/login",
|
||||
query: {
|
||||
"return-to": btoa(fullPath),
|
||||
"return-to": encodeReturnTo(fullPath),
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user