Page 1 of 1

adding nzb through webinterface newzbin WEB

Posted: June 11th, 2018, 2:59 am
by iluvatar
Hi,

I am running SABNZB 2.3.4 on a Synology NAS (918+). Up until 2.3.2 I was able to add NZB's to the queue from Newzbin Web and a green check appeared signaling it went ok. Now, on 2.3.4 the NZB gets added to the queue OK, but in Newzbin I get the message : cannot connect to SABNZB. Check your settings (In a red bar). This happens in multiple browsers (IE, Edge and Chrome). In the Newzbin application (the non-web version) it works ok. Who knows what's happening, and more importantly, how to fix it ?

Re: adding nzb through webinterface newzbin WEB

Posted: June 11th, 2018, 11:49 am
by safihre
Strange. Maybe you can ask the creator of the plugin?
I don't think we really changed anything for our code that signals the completion.

Re: adding nzb through webinterface newzbin WEB

Posted: June 11th, 2018, 12:18 pm
by iluvatar
funny thing is : it worked until 2.3.2, and it stopped working with 2.3.4. Are you sure there's no 'signal' from sabnzb to plugin ? Success or failure of the queueing attempt ?

Re: adding nzb through webinterface newzbin WEB

Posted: June 11th, 2018, 1:23 pm
by sander
Well, in SABnzbd 2.3.3 a security feature was introduced (see https://sabnzbd.org/wiki/extra/hostname-check.html), but that can't be the problem because you say "on 2.3.4 the NZB gets added to the queue OK". That is the proof that that security feature is NOT kicking in.

EDIT:

I can reproduce what you describe.
* Based on the 2.3.3+ DNS FQDN whitelist check, I would expect the connection to be refused Via API no whitelisting done, so correct behaviour.
* Newzbin Web says "connection failed', whereas SAB's JSON answer looks good to me ...

???

Re: adding nzb through webinterface newzbin WEB

Posted: June 12th, 2018, 5:33 am
by iluvatar
sander wrote:
June 11th, 2018, 1:23 pm
I can reproduce what you describe.
* Based on the 2.3.3+ DNS FQDN whitelist check, I would expect the connection to be refused Via API no whitelisting done, so correct behaviour.
* Newzbin Web says "connection failed', whereas SAB's JSON answer looks good to me ...
Thanks for your insight. Are you in a position to compare the JSON answer of 2.3.4 with a JSON answer of 2.3.2
I would do it myself, but don't know how.

Re: adding nzb through webinterface newzbin WEB

Posted: June 12th, 2018, 9:37 am
by sander
iluvatar wrote:
June 12th, 2018, 5:33 am
sander wrote:
June 11th, 2018, 1:23 pm
I can reproduce what you describe.
* Based on the 2.3.3+ DNS FQDN whitelist check, I would expect the connection to be refused Via API no whitelisting done, so correct behaviour.
* Newzbin Web says "connection failed', whereas SAB's JSON answer looks good to me ...
Thanks for your insight. Are you in a position to compare the JSON answer of 2.3.4 with a JSON answer of 2.3.2
I would do it myself, but don't know how.
Certainly:

SAB 2.3.2 JSON answer:

Code: Select all

Date: Mon, 11 Jun 2018 19:32:57 GMT
Content-Type: application/json;charset=UTF-8

jQuery1111035090828010239794_1528745559602({"status": true, "nzo_ids": ["SABnzbd_nzo_VDo1Wm"]})
... looks a bit strange

SAB 2.3.4 answers:

Code: Select all

Date: Mon, 11 Jun 2018 18:49:17 GMT
Access-Control-Allow-Origin: *
Content-Type: application/json;charset=UTF-8

{"status": true, "nzo_ids": ["SABnzbd_nzo_u_HMUA"]}
Ah, that looks better!

So the Newzbin people should read the SAB 2.3.4 answer, and make their code compliant.

Re: adding nzb through webinterface newzbin WEB

Posted: June 12th, 2018, 1:21 pm
by iluvatar
safihre wrote:
June 11th, 2018, 11:49 am
Strange. Maybe you can ask the creator of the plugin?
I don't think we really changed anything for our code that signals the completion.
As it turns out, something WAS changed after all. I've asked the newzbin people. Or is it possible to change the JSON output to the format < 2.3.3

Re: adding nzb through webinterface newzbin WEB

Posted: June 12th, 2018, 2:07 pm
by sander
iluvatar wrote:
June 12th, 2018, 1:21 pm
safihre wrote:
June 11th, 2018, 11:49 am
Strange. Maybe you can ask the creator of the plugin?
I don't think we really changed anything for our code that signals the completion.
As it turns out, something WAS changed after all. I've asked the newzbin people. Or is it possible to change the JSON output to the format < 2.3.3
You've contacted Newzbin? Did they react?

Change is probably https://github.com/sabnzbd/sabnzbd/comm ... d51cc14f68 (I'm not the author) ... and that looks like a bug fix ("Remove callback from API. It was only half-implemented."), so changing back is re-introducing a bug.

EDIT:

And as you reported yourself: adding the NZB works. So the Newzbin only have to change what their website says, I would ... uhmmm ... say.

Re: adding nzb through webinterface newzbin WEB

Posted: June 12th, 2018, 2:52 pm
by safihre
Would like to add that since 2.3.4 we support CORS headers, which was previously not implemented. That's why (possibly) they used the callback function (that was only partially implemented).
Now they shouldn't have to do that anymore with the new version.

Re: adding nzb through webinterface newzbin WEB

Posted: June 13th, 2018, 8:31 am
by iluvatar
sander wrote:
June 12th, 2018, 2:07 pm

You've contacted Newzbin? Did they react?

Change is probably https://github.com/sabnzbd/sabnzbd/comm ... d51cc14f68 (I'm not the author) ... and that looks like a bug fix ("Remove callback from API. It was only half-implemented."), so changing back is re-introducing a bug.

EDIT:

And as you reported yourself: adding the NZB works. So the Newzbin only have to change what their website says, I would ... uhmmm ... say.
I raised a topic on their forum. No reaction unfortunately
https://newzbin.org/showthread.php?tid=9774

Re: adding nzb through webinterface newzbin WEB

Posted: June 25th, 2018, 2:05 pm
by iluvatar
they fixed it.

Re: adding nzb through webinterface newzbin WEB

Posted: June 25th, 2018, 2:17 pm
by sander
iluvatar wrote:
June 25th, 2018, 2:05 pm
they fixed it.
Good to hear. Thanks for the info.