Skip to content
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

uri.PathAndQuery.ToLower() is not working and return "Bad mac" #26

Open
rustbomber opened this issue Jun 27, 2014 · 1 comment
Open

Comments

@rustbomber
Copy link

Hawk.cs:

the code in CalculateMac method, when i remove ToLower() ,and work well

var normalized = "hawk.1." + type + "\n" +
ts + "\n" +
nonce + "\n" +
method.ToUpper() + "\n" +
uri.PathAndQuery.ToLower() + "\n" +
sanitizedHost.ToLower() + "\n" +
uri.Port.ToString() + "\n" +
((!string.IsNullOrEmpty(payloadHash)) ? payloadHash : "") + "\n" +
((!string.IsNullOrEmpty(ext)) ? ext : "") + "\n";

@Luke888888
Copy link

Yes, the ".ToLower()" statement was introduced when fixing issule #24 with commit 8277367

The issue is NOT in the current nuget version 1.4.4, apparently no new nuget package was build.

As long this issue is open, the project is not working according to the Hawk protocol, because URL's are case sensitive in the protocol.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants