-
Notifications
You must be signed in to change notification settings - Fork 133
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
Inject encoder #23
Inject encoder #23
Conversation
$header = json_decode($encoder->decode($parts[0]), true); | ||
$payload = json_decode($encoder->decode($parts[1]), true); | ||
$header = json_decode($pwet = $encoder->decode($parts[0]), true); | ||
$payload = json_decode($meuh = $encoder->decode($parts[1]), true); |
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.
what are these variables? :)
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.
What variables ? There are no variables… there never were variables. Seriously, good catch, I used that for debugging while writing my tests, sorry for this
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.
no worries :)
On Wed, Feb 11, 2015 at 12:46 PM, Grégoire Paris notifications@github.com
wrote:
In src/Namshi/JOSE/JWS.php
#23 (comment):$parts = explode('.', $jwsTokenString); if (count($parts) === 3) {
$header = json_decode($encoder->decode($parts[0]), true);
$payload = json_decode($encoder->decode($parts[1]), true);
$header = json_decode($pwet = $encoder->decode($parts[0]), true);
$payload = json_decode($meuh = $encoder->decode($parts[1]), true);
What variables ? There are no variables… there never were variables.
Seriously, good catch, I used that for debugging while writing my tests,
sorry for this—
Reply to this email directly or view it on GitHub
https://github.com/namshi/jose/pull/23/files#r24480019.
Nadalin Alessandro
http://www.linkedin.com/in/alessandronadalin
www.odino.org
www.twitter.com/_odino_
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.
ops these are still here :)
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.
push -f from work then from home (or the other way around explains it). Sorry for that, I'll fix it rightaway!
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.
dont worry :)
On Tue, Feb 17, 2015 at 3:32 PM, Grégoire Paris notifications@github.com
wrote:
In src/Namshi/JOSE/JWS.php
#23 (comment):$parts = explode('.', $jwsTokenString); if (count($parts) === 3) {
$header = json_decode($encoder->decode($parts[0]), true);
$payload = json_decode($encoder->decode($parts[1]), true);
$header = json_decode($pwet = $encoder->decode($parts[0]), true);
$payload = json_decode($meuh = $encoder->decode($parts[1]), true);
push -f from work then from home (or the other way around explains it).
Sorry for that, I'll fix it rightaway!—
Reply to this email directly or view it on GitHub
https://github.com/namshi/jose/pull/23/files#r24810271.
Nadalin Alessandro
http://www.linkedin.com/in/alessandronadalin
www.odino.org
www.twitter.com/_odino_
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.
fixed
5d530a1
to
104593e
Compare
Sound good ? |
->willReturn('{"alg": "test"}') | ||
->shouldBeCalled(); | ||
JWS::load($this->jws->getTokenString(), $encoder->reveal()); | ||
} |
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.
isnt the encoder mocked twice?
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.
No, the same method is mocked for two consecutive calls (decoding the header then decoding the payload). Apparently, this need to be done in reverse order (must be a heap).
9e76286
to
4c98494
Compare
hey man :) could you please rebase? |
4c98494
to
49c1a5f
Compare
Vulnerabilities are not something you are vulnerable to, they are something you have.
hey! I'm done. I added some commits because I noticed some mistakes in the README will fixing some conflicts. |
to a security vulnerability. More info [here](http://tech.namshi.com/blog/2015/02/19/update-your-namshi-slash-jose-installations-as-a-security-vulnerability-was-found/).** | ||
use previous versions other than 1.0.2, 1.1.2, 2.0.3 as they have a security | ||
vulnerability. More info [here](http://tech.namshi.com/blog/2015/02/19/update-your-namshi-slash-jose-installations-as-a-security-vulnerability-was-found/).** | ||
|
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.
thanks man!
👍 |
Comes with tests and docs. I had to update phpunit to be able to use prophecy, which comes with phpunit 4.5