UpdateToken icon indicating copy to clipboard operation
UpdateToken copied to clipboard

Multiple values in HTTP Authorization headers are not recognized

Open VitaliDzemidovich opened this issue 7 years ago • 5 comments

Please note that this plugin truncates all additional values of Authorization headers except the first one.

Example:

-----Request Before Plugin Update-------
GET /some/path HTTP/1.1
...
Authorization: Bearer aaaaa.bbbbbb.cccccc, something parameter=value
...

-----Request After Plugin Update-------
GET /some/path HTTP/1.1
...
Authorization: Bearer aaaaa.bbbbbb.cccccc
...

As a result "something parameter=value" will be deleted from the resulting request.

Please refer corresponding RFC: https://tools.ietf.org/html/rfc7230#section-3.2.2

VitaliDzemidovich avatar Dec 13 '17 14:12 VitaliDzemidovich

To fix this, I think you can change https://github.com/alexlauerman/UpdateToken/blob/master/src/burp/BurpExtender.java#L89

to use split(" ", 1)

Feel free to submit a PR if you are able to verify this works.

alexlauerman avatar Dec 13 '17 14:12 alexlauerman

Hi Alex, Sorry but I'm not a developer and actually I'm not going to use this plugin for its intended purpose in future. I just wanted to warn people about possible problems that can arise if the plugin is enabled in the background. Nevertheless thanks for your great work!

Thanks, VItali

VitaliDzemidovich avatar Dec 14 '17 07:12 VitaliDzemidovich

You're welcome. No problem. Let me know if you want me to modify the plugin for you and rebuild the jar. It won't take too long.

Many times, this plugin will need modification, because the token gets returned in different places.

alexlauerman avatar Dec 14 '17 15:12 alexlauerman

There is now a burp extension in the BApp store called TokenJar. It may be worth checking out. I have not used it.

alexlauerman avatar Dec 14 '17 15:12 alexlauerman

Just to reply to my own suggestion, I tried both TokenJar and TokenExtractor today, although neither worked for me for an authorization header.

alexlauerman avatar May 06 '19 18:05 alexlauerman