0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-27 22:49:56 -05:00

Fixed JWT regex

This commit is contained in:
Fabien O'Carroll 2018-12-07 16:21:52 +07:00
parent 9b105e7590
commit cf6822ba36

View file

@ -21,7 +21,7 @@ DomReady(function () {
const [hashMatch, hash, query] = window.location.hash.match(/^#([^?]+)\??(.*)$/) || [];
if (hashMatch && hash === 'reset-password') {
const [tokenMatch, token] = query.match(/token=([a-zA-z-_]+.[a-zA-Z-_]+.[a-zA-Z-_]+)/) || [];
const [tokenMatch, token] = query.match(/token=([a-zA-Z0-9-_]+.[a-zA-Z0-9-_]+.[a-zA-Z0-9-_]+)/) || [];
if (tokenMatch) {
return members.resetPassword({token})
.then(reload);