4.11 Session Key Required

Get help with all aspects of SABnzbd
Forum rules
Help us help you:
  • Are you using the latest stable version of SABnzbd? Downloads page.
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Post Reply
littlephil
Newbie
Newbie
Posts: 7
Joined: October 4th, 2008, 10:49 am

4.11 Session Key Required

Post by littlephil »

I have performed a fresh install using the source files on Debian. I am receiving error: Session Key Required on both the Default and Plush skins. This must be an issue with just my setup as I see this issue was fixed as part of the 4.11 release.

I have checked the Cherry and SAB logs but nothing seems to suggest a problem. Any suggestions on where to look next?

Thank you in advance.
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: 4.11 Session Key Required

Post by shypike »

Tell us where it goes wrong exactly.
Maybe we missed another instance requiring a session key.

Otherwise the skins and the code may not match.
How did you install exactly?
littlephil
Newbie
Newbie
Posts: 7
Joined: October 4th, 2008, 10:49 am

Re: 4.11 Session Key Required

Post by littlephil »

I installed by downloading a fresh copy from sourceforge (4.11, Python source) and run from the command line using SABnzbd.py

It seems to happen anywhere the session would be used, even the shutdown link, there is a query string parameter for session but it is empty, so the shutdown URL becomes:

/sabnzbd/shutdown?session=

I am running it behind Apache but I get the same results using elinks on the server.

It seems fine on my OSX box so it must be configuration on my Debian machine, just don't know where to look:/

Thanks for your help:)
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: 4.11 Session Key Required

Post by shypike »

Go to Config->General and click on the text link "Generate new API key".
littlephil
Newbie
Newbie
Posts: 7
Joined: October 4th, 2008, 10:49 am

Re: 4.11 Session Key Required

Post by littlephil »

The Plush skin just says Generate new API key in the box and doesn't do anything when I try to generate one, the Default gives me the same Session Key Required Error when I try to generate a key.

That said there does appear to be an API key in my ini file, if I add that to the shutdown URL (session=API-KEY) then it seems to work. Could this be a problem with my template libraries?
Last edited by littlephil on May 25th, 2009, 12:57 am, edited 1 time in total.
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: 4.11 Session Key Required

Post by shypike »

Are you trying to shutdown SABnzbd with a script (using "curl" or "wget")?
If so, then indeed you need to add "?session=blabla" to the URL.
I thought you were complaining about the regular web UI.
littlephil
Newbie
Newbie
Posts: 7
Joined: October 4th, 2008, 10:49 am

Re: 4.11 Session Key Required

Post by littlephil »

My apologies that last comment was a little misleading.

Using the regular UI anywhere the "session" query string parameter is used it is blank. If I copy in the API key found in my ini file manually then the links work. For example, my current shutdown link is:

/sabnzbd/shutdown?session=

and shows the error described, if I add the API key manually I get:

/sabnzbd/shutdown?session=MY-API-KEY

this URL then works as expected.
User avatar
switch
Moderator
Moderator
Posts: 1380
Joined: January 17th, 2008, 3:55 pm
Location: UK

Re: 4.11 Session Key Required

Post by switch »

What browser are you using? Try another.
Have you tried the SMPL skin?
Is disable api key enabled in config>general? If so, disable it so the api key is "enabled".
littlephil
Newbie
Newbie
Posts: 7
Joined: October 4th, 2008, 10:49 am

Re: 4.11 Session Key Required

Post by littlephil »

Tried with SMPL skin, tried disable_api_key as both 0 and 1 and also tried Safari as well as Firefox on OS X (install is on Debian which is installed on NSLU2) hence elinks.

Everything works if I disable the api key.

SMPL gets the same error when I try it with the api key enabled. I guess I can just disable it for now?
AnotherHowie
Newbie
Newbie
Posts: 2
Joined: June 16th, 2009, 1:34 pm

Re: 4.11 Session Key Required

Post by AnotherHowie »

I'm seeing this with 0.4.11 too. "?session=" on the end of URLs, but no key. The key is in my ini file.

I get the following in my logs:

"Mozilla/5.0 (Windows; U; Windows NT 6.0; en-GB; rv:1.9.0.11) Gecko/2009060215 Firefox/3.0.11"

*** WARNING ***
The following keys are members of the Template class and will result in NameMapper collisions!
  > session

Please change the key's name or use the compiler setting "prioritizeSearchListOverSelf=True" to prevent the NameMapper from using
the Template member in place of your searchList variable
***************

Is this something to do with particular versions of Cheetah? Mine is Cheetah-2.2.1 from FreeBSD ports.
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: 4.11 Session Key Required

Post by shypike »

Yes it's  Cheetah's fault.

The quickest way to "solve" it is to edit the sabnzbd.ini file.
Replace:

Code: Select all

[misc]
disable_key=0
by

Code: Select all

[misc]
disable_key=1
AnotherHowie
Newbie
Newbie
Posts: 2
Joined: June 16th, 2009, 1:34 pm

Re: 4.11 Session Key Required

Post by AnotherHowie »

Is that really disable_key or disable_api_key? Cos I have the latter, but not the former...
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: 4.11 Session Key Required

Post by shypike »

You're right it's disable_api_key.
Post Reply