400 Bad Request: 'Illegal cookie name snatched_view

Report & discuss bugs found in SABnzbd
Post Reply
fontes31
Newbie
Newbie
Posts: 8
Joined: May 25th, 2014, 1:45 pm

400 Bad Request: 'Illegal cookie name snatched_view

Post by fontes31 » December 10th, 2016, 4:44 pm

Hi,

I changed the internal ip of my freenas. With that, when i try to work with sabnzbd i have this error:

400 Bad Request

Illegal cookie name snatched_view

Traceback (most recent call last):
File "/usr/pbi/sabnzbd-amd64/share/sabnzbdplus/cherrypy/_cprequest.py", line 635, in respond
self.process_headers()
File "/usr/pbi/sabnzbd-amd64/share/sabnzbdplus/cherrypy/_cprequest.py", line 737, in process_headers
raise cherrypy.HTTPError(400, msg)
HTTPError: (400, 'Illegal cookie name snatched_view')


I do not know what happened.

User avatar
safihre
Administrator
Administrator
Posts: 1856
Joined: April 30th, 2015, 7:35 am
Location: Switzerland
Contact:

Re: 400 Bad Request: 'Illegal cookie name snatched_view

Post by safihre » December 11th, 2016, 1:55 am

You probably also run couchpotato on this server? Since both (or more) services are on the same IP they have to share cookies, which can lead to problems.
Best is to clear all your cookies in your browser for your NAS ip address. That should fix it!

hasu0bs
Newbie
Newbie
Posts: 6
Joined: September 9th, 2017, 8:03 am

Re: 400 Bad Request: 'Illegal cookie name snatched_view

Post by hasu0bs » September 13th, 2017, 11:09 am

I have this constantly. I have other services running on the same IP but sabnzbd complains about its OWN cookies: login_cookie

What can I do about this? Its pretty inconvenient to clear the cookies everytime I switch apps. What is the real cause of this?

User avatar
safihre
Administrator
Administrator
Posts: 1856
Joined: April 30th, 2015, 7:35 am
Location: Switzerland
Contact:

Re: 400 Bad Request: 'Illegal cookie name snatched_view

Post by safihre » September 13th, 2017, 12:34 pm

Both services are messing with eachothers cookies.
You can try to open the services via different domains, for example 1 service via IP, while the other by hostname:

Code: Select all

http://192.168.1.1:8080
http://htpc:9090

hasu0bs
Newbie
Newbie
Posts: 6
Joined: September 9th, 2017, 8:03 am

Re: 400 Bad Request: 'Illegal cookie name snatched_view

Post by hasu0bs » September 13th, 2017, 1:39 pm

So its a security feature? Sab suspects someone messed with the cookies and blocks access?
I'd say that its probably the most common usecase that people run those services on the same host/ip.
Thank you for the workaround though :)

User avatar
safihre
Administrator
Administrator
Posts: 1856
Joined: April 30th, 2015, 7:35 am
Location: Switzerland
Contact:

Re: 400 Bad Request: 'Illegal cookie name snatched_view

Post by safihre » September 13th, 2017, 2:14 pm

No it's the web framework we use, it's doing some checks and it's pretty specific to the official standards. According to them it's the other programs that don't follow the rules correctly :p

Post Reply