#1
I was looking at my SB logs tonight and I noticed something weird. NZB360 was sending my SAB API key to SickBeard a few times before it got it right. My logs only cover today, so I'll check back tomorrow to see if it happens again. While I haven't seen this behavior in any other of my logs yet, that doesn't mean it's not. Please let me know if you need anymore info. Thanks!

Code: Select all

2014-04-17 22:27:59 WARNING  CP Server Thread-7 :: API :: <IP> - gave WRONG API KEY <KEY>. ACCESS DENIED
2014-04-17 22:28:19 WARNING  CP Server Thread-5 :: API :: <IP> - gave WRONG API KEY <KEY>. ACCESS DENIED
2014-04-17 22:28:19 WARNING  CP Server Thread-3 :: API :: <IP> - gave WRONG API KEY <KEY>. ACCESS DENIED
2014-04-17 22:28:22 DEBUG    CP Server Thread-4 :: API :: <IP> - gave correct API KEY. ACCESS GRANTED
#3
Ok, it's happening again and it's some what reliable at that... It seems to be happening around this part of the logs, especially if it's the first login in a while. I have SAB load first, I'll wait a little while and try a SAB -> CP -> SP to see if it'll leak CP's key as well, if that'll help. Let me know if you need anything else.

Code: Select all

2014-04-18 16:15:27 DEBUG    CP Server Thread-6 :: sickbeard.db: SELECT * FROM tv_episodes WHERE showid = ? AND airdate >= ? AND airdate <= (SELECT airdate FROM tv_episodes WHERE showid = ? AND airdate >= ? AND status = ? ORDER BY airdate ASC LIMIT 1) and status = ? with args []
2014-04-18 16:15:27 DEBUG    CP Server Thread-6 :: 239761: No episode found... need to implement tvrage and also show status
2014-04-18 16:15:27 WARNING  CP Server Thread-3 :: API :: <IP> - gave WRONG API KEY <KEY>. ACCESS DENIED
2014-04-18 16:15:27 WARNING  CP Server Thread-4 :: API :: <IP> - gave WRONG API KEY <KEY>. ACCESS DENIED
2014-04-18 16:15:27 DEBUG    CP Server Thread-6 :: API :: <IP> - gave correct API KEY. ACCESS GRANTED
2014-04-18 16:15:27 DEBUG    CP Server Thread-6 :: API :: all args: '()'
2014-04-18 16:15:27 DEBUG    CP Server Thread-6 :: API :: all kwargs: '{'sort': u'date', 'cmd': u'future'}'
2014-04-18 16:15:27 DEBUG    CP Server Thread-6 :: API :: future: curKwargs {'sort': u'date'}
2014-04-18 16:15:27 DEBUG    CP Server Thread-6 :: sickbeard.db: SELECT airdate, airs, episode, name AS 'ep_name', description AS 'ep_plot', network, season, showid AS 'tvdbid', show_name, tv_shows.quality AS quality, tv_shows.status AS 'show_status', tv_shows.paused AS 'paused' FROM tv_episodes, tv_shows WHERE season != 0 AND airdate >= ? AND airdate < ? AND tv_shows.tvdb_id = tv_episodes.showid AND tv_episodes.status NOT IN (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) with args []
#4
To add on this, I'm having the very same issue after I switched SickBeard to a different fork (I copied the API key from the old fork to the config file of the new fork).

SickBeard gets sent the SABnzbd API key for some reason instead of the SickBeard key. I've changed the API key by padding a character, it then sends the proper key, but as soon as I change it back it sends the SABnzbd key.

I'm sure that clearing application data would solve this issue, but I figured I'd contribute to this thread to help you find the possible issue.
#6
Kevin,

I am also getting this in Sick Beard's logs:

2014-04-25 15:21:51 WARNING CP Server Thread-13 :: API :: 192.168.1.5 - gave WRONG API KEY <SABNZBD API KEY>. ACCESS DENIED

Looks like it might be sending SAB's API key instead of Sick Beard's key perhaps?

LJ
#9
I think I have the fix. Will be included in the next update. Since I cannot reproduce, this is a shot in the dark. Once the update goes live, let me know if this is resolved.
cron