Skip to content

Commit

Permalink
'session' should also be allowed instead of just 'apikey'
Browse files Browse the repository at this point in the history
Because of new check introduced previously
  • Loading branch information
Safihre committed Apr 26, 2016
1 parent a198290 commit ab5b240
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion interfaces/Config/templates/config_server.tmpl
Expand Up @@ -350,7 +350,7 @@
\$.ajax({
type: "POST",
url: "../../tapi",
data: "mode=config&output=json&name=test_server&" + \$(this).parents('form:first').serialize()
data: "mode=config&output=json&name=test_server&" + \$(this).parents('form:first').serialize()
}).then(function(data) {
// Fill the box and enable the button
resultBox.removeClass('alert-success alert-danger').show()
Expand Down
2 changes: 2 additions & 0 deletions sabnzbd/interface.py
Expand Up @@ -272,6 +272,8 @@ def log_warning(txt):
# First check APIKEY, if OK that's sufficient
if not (cfg.disable_key() or nokey):
key = kwargs.get('apikey')
if not key:
key = kwargs.get('session')
if not key:
if not special:
log_warning(T('API Key missing, please enter the api key from Config->General into your 3rd party program:'))
Expand Down

0 comments on commit ab5b240

Please sign in to comment.