office-js-helpers
office-js-helpers copied to clipboard
Modified regex in extractParams to ignore leading frontslash
This PR relates to #90. Please, refer to that issue for the motivation.
As explained in that PR the regex used in src/authentication/authenticator.ts:125
was modified from
/([^&=]+)=([^&]*)/g
to
/[\/]?([^&=]+)=([^&]*)/g
to ignore front-slashes. Also, that removes to perform the following check:
// Fixes bugs when the state parameters contains a / before them
if (matchParts[1] === '/state') {
matchParts[1] = matchParts[1].replace('/', '');
}
So those lines were removed.
PS, I think Prettier buggered your current formatting. I'm very sorry. I didn't want to do a global replace in case I messed something else up. Please, let me know what formatter you're using and I'l try to clean that up.
I have tested in a current project.
@casieber Can you take a look at this?
@WrathOfZombies, @casieber any chance this can get merged? I know everyone's busy, but I'd be happy to help any way I can.
Hey, @WrathOfZombies, @Zlatkovsky , or any other admin, I can no longer maintain this PR. Feel free to assign someone else to it or close it.