New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix: treat empty access token string as undefined [2.x] #4079
Conversation
Can one of the admins verify this patch? To accept patch and trigger a build add comment ".ok\W+to\W+test." |
@slnode ok to test |
@andrey-abramow thank you for the pull request. Please add a test to verify the fix - the test should fail agains the current master and pass with your fix in place. See the existing test suite for inspiration: loopback/test/access-token.test.js Lines 413 to 446 in b064b6d
|
@andrey-abramow also please
Here are the git commands to run, in case you are not familiar with git history manipulation:
|
Last but not least, make sure that
Quite a few comments to address, but hopefully most of the problems will be easy & quick to fix. Let me know if you need any help. I am looking forward to see your pull request accepted ❤️ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
☝️
@bajtos Thanks! Done! |
@bajtos Hello! Please, let me know if I missed something or made it wrong.
|
Yes please! Sorry for the delay, I am overwhelmed by GH notifications. I'll take a closer look at this pull request early next week. |
The windows test is failing with the following error, I think it's unrelated to changes made in this pull request. <testcase classname="User Verification user.verify(options, fn)"
name="Verify a user's email address with custom token generator" time="0"
><failure>0 == true
AssertionError: 0 == true
at test\user.test.js:1523:13
at common\models\user.js:150:273
at Nodemailer.<anonymous> (node_modules\nodemailer\lib\nodemailer.js:329:26)
at StubTransport.<anonymous> (node_modules\nodemailer-stub-transport\src\stub-transport.js:78:13)
at Immediate._onImmediate (node_modules\async-listener\glue.js:188:31)</failure></testcase> |
I find this commit message as not very useful to people reading git history, because it does not describe what is being changed in the user-observable behavior. I'll edit the commit message for you to speed up the process of landing this pull request. |
Fix AccessToken's method tokenIdForRequest to treat an empty string as if no access token was provided. This is needed to accomodate the changes made in loopback-datasource-juggler@2.56.0.
Here is the new commit message:
Let's wait for CI results before landing. |
Landed, thank you for your first contribution! ❤️ I have published the fix in |
@andrey-abramow It makes me wonder, is this issue present in 3.x version of LoopBack too? Would you mind forward-porting your patch and opening a new pull request against |
Related issues