diff --git a/lib/core/auth.js b/lib/core/auth.js index 92a2ad3e9..f03222a78 100644 --- a/lib/core/auth.js +++ b/lib/core/auth.js @@ -304,7 +304,7 @@ export default class Auth { return } - const from = this.options.fullPathRedirect ? this.ctx.route.path : this.ctx.route.fullPath + const from = this.options.fullPathRedirect ? this.ctx.route.fullPath : this.ctx.route.path let to = this.options.redirect[name] if (!to) { diff --git a/lib/core/utilities.js b/lib/core/utilities.js index f24a1e400..7fd1343ab 100644 --- a/lib/core/utilities.js +++ b/lib/core/utilities.js @@ -4,7 +4,7 @@ export const isSet = o => !isUnset(o) export const isSameURL = (a, b) => a.split('?')[0] === b.split('?')[0] export const isRelativeURL = u => - u && u.length && /^\/[a-zA-Z0-9@\-%_~][/a-zA-Z0-9@\-%_~]{1,200}$/.test(u) + u && u.length && /^\/[a-zA-Z0-9@\-%_~][/a-zA-Z0-9@\-%_~]*[\?]?([^\#]*)#?([^\#]*)$/.test(u) export const parseQuery = queryString => { const query = {}