Cookie Named Guid Breaks Web Ui Http Requests


sandymac

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.
Link to comment
Share on other sites

  • 2 months later...
  • 4 weeks later...
  • 2 months later...
  • 2 weeks later...
  • 1 year later...

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
Link to comment
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.