akveo / akveo/nebular

Error in function parseHashAsQueryParams in NbOAuth2AuthStrategy when token contains the character equals '='

Ouverte
#2,518 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
TypeScript
Étoiles
8.1k
Forks
1.5k
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

Hi,
When using oauth2 strategy, I used to have token containing equals character (=), but the function that extract the token from the url params is spliting by this same character which makes the token incorrect. I propose that the function parseHashAsQueryParams uses indexOf and substring functions instead :
something like :
```
let key=part.substring(0,part.indexOf('='));
let value=part.substring(part.indexOf('=')+1);
```
if part="access_token=mPe+/DazAEXUU2D/oJO71kDLyk4="
the value of the key access_token is from first character after equals to the end = "mPe+/DazAEXUU2D/oJO71kDLyk4="

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.