office-js-helpers icon indicating copy to clipboard operation
office-js-helpers copied to clipboard

Modified regex in extractParams to ignore leading frontslash

Open Seebiscuit opened this issue 6 years ago • 5 comments

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.

Seebiscuit avatar May 17 '18 17:05 Seebiscuit

CLA assistant check
All CLA requirements met.

msftclas avatar May 17 '18 17:05 msftclas

I have tested in a current project.

Seebiscuit avatar May 17 '18 17:05 Seebiscuit

@casieber Can you take a look at this?

WrathOfZombies avatar May 29 '18 08:05 WrathOfZombies

@WrathOfZombies, @casieber any chance this can get merged? I know everyone's busy, but I'd be happy to help any way I can.

Seebiscuit avatar Jun 20 '18 14:06 Seebiscuit

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.

Seebiscuit avatar Sep 11 '19 15:09 Seebiscuit