Skip to content

Difference with node-http-signature regarding (request-target) #5

Closed

Description

@vonagam

As it is seen from those lines:

https://github.com/joyent/node-http-signature/blob/529441d9d04a8ecb296a2a152929332526344673/lib/signer.js#L331

hashBuilder.append(this.getRequestTarget()).append('\n');

There is a difference between inclusion of request-target in a signing string.
In joyent implementation they prepend "(request-target): " before value.
In this implementation this is not done.

I think this problem came from inconsistent spec ( https://github.com/joyent/node-http-signature/blob/529441d9d04a8ecb296a2a152929332526344673/http_signing.md ) which references request-line (depreceated) in Signing String Composition, but uses request-target in examples (one time missing colon).

I think it is better to follow joyent implementation to avoid inconsistency.
What are your thoughts?

Activity

  1. adamcin commented on Mar 6, 2017

    @adamcin
    Owner

    Thanks, @vonagam. I haven't been keeping up with the evolution of the spec, so I'm not surprised I missed this change. On the other hand, I'm not surprised that this particular change was made, since I noticed that the HTTP protocol version specifier isn't always present or consistent in Java HTTP client/server APIs. I will implement this ASAP.

    edit: I take it back. It's been so long that I didn't even remember that I handled the deprecation in another commit.

  2. adamcin commented on Mar 7, 2017

    @adamcin
    Owner

    Fix included in httpsig-java 1.3.0 release.

  3. vonagam commented on Mar 7, 2017

    @vonagam
    Author

    Thanks for fast response and your time put into this library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions