sandymac

Cookie Named Guid Breaks Web Ui Http Requests

Recommended Posts

Previously I was asked me to wait for until an update to the web UI about a bug I was having with cookies. With 1.3.105 the problem is still there. I've boiled the problem down to the smallest test case I can. Basicly if there is a cookie with a name that ends with "GUID" the HTTP request for the web UI errors with "invalid request" for me. Doesn't matter what the cookie value is.

 

Test script:

 

#/bin/bash

cookie="xUID=a" # no error
cookie="GUIx=a" # no error
cookie="GUIDx=a" # no error
cookie="GUID=a" # invalid
cookie="xGUID=a" # invalid
 
curl --verbose --cookie "$cookie" "http://localhost:8888/"

 

 
Sample output:
$ curl --verbose --cookie GUID=a http://localhost:8888/
* Hostname was NOT found in DNS cache
*   Trying ::1...
* connect to ::1 port 8888 failed: Connection refused
*   Trying 127.0.0.1...
* Connected to localhost (127.0.0.1) port 8888 (#0)
> GET / HTTP/1.1
> User-Agent: curl/7.35.0
> Host: localhost:8888
> Accept: */*
> Cookie: GUID=a
< HTTP/1.1 400 ERROR
< Connection: keep-alive
< Content-Length: 17
< Content-Type: text/html
 
* Connection #0 to host localhost left intact
invalid request
 
Repeat of this post.

Share this post


Link to post
Share on other sites

1.4.72 still returns with an invalid request if there is a GUID cookie.

 

Edit: I did notice this in the linux --nodaemon output:

 

[20140829 16:57:02.100] HTTP: IP 127.0.0.1: can't accept cookie - incorrect format

Share this post


Link to post
Share on other sites

Coming up on two years later and this is still a bug for me for btsync 2.3.0 on Linux x86.

 

Bug (note GUID cookie):

$ curl --verbose --cookie GUID=a http://localhost:9999/*   Trying ::1...* connect to ::1 port 9999 failed: Connection refused*   Trying 127.0.0.1...* Connected to localhost (127.0.0.1) port 9999 (#0)> GET / HTTP/1.1> Host: localhost:9999> User-Agent: curl/7.43.0> Accept: */*> Cookie: GUID=a> < HTTP/1.1 400 ERROR< Connection: keep-alive< Content-Length: 17< Content-Type: text/html< * Connection #0 to host localhost left intactinvalid request

Works (note cookie name change):

$ curl --verbose --cookie GUIDx=a http://localhost:9999/*   Trying ::1...* connect to ::1 port 9999 failed: Connection refused*   Trying 127.0.0.1...* Connected to localhost (127.0.0.1) port 9999 (#0)> GET / HTTP/1.1> Host: localhost:9999> User-Agent: curl/7.43.0> Accept: */*> Cookie: GUIDx=a> < HTTP/1.1 301 Moved Permanently< Connection: close< Location: /gui/< * Closing connection 0

Share this post


Link to post
Share on other sites

@sandymac

While this is obviously a bug, it doesn't pop up rather often, so we have to postpone its resolution. May I ask you what is your use case that you encounter this issue?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.