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:
@@ -13,6 +13,7 @@ import { defineStore } from "pinia";
|
||||
import axios from "axios";
|
||||
import apiClient from "@/api/client.js";
|
||||
import apiError from "@/module/apiError.js";
|
||||
import { decodeReturnTo } from "@/utils/returnToEncoding";
|
||||
import {
|
||||
deleteCookie,
|
||||
setCookie,
|
||||
@@ -73,7 +74,7 @@ export const useLoginStore = defineStore("loginStore", {
|
||||
if (this.rememberedReturnToUrl !== "") {
|
||||
let decodedUrl = "";
|
||||
try {
|
||||
decodedUrl = atob(this.rememberedReturnToUrl);
|
||||
decodedUrl = decodeReturnTo(this.rememberedReturnToUrl);
|
||||
} catch {
|
||||
this.$router.push("/files");
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user