Closed jorikcaljouw closed 7 years ago
Quick update, the change did not resolve the issue on jadahl's server. So while this is still an issue, it seems my fix does not resolve it. I will perform some more debugging!!
The curl command from Synology was not correct for testing. The proposed fix does in fact resolve the issue :-)!
A better command for testing if DS411+II works is:
curl -L -A "synology_x86_411+II DSM6.1-14902 (package)" --data "package_update_channel=stable&unique=synology_x86_411%2BII&build=14903&language=enu&major=6&arch=x86&minor=1&timezone=Amsterdam" "http://www.jadahl.com/domoticz_stable_6/"
As you can see the + in the unique parameter is replaced with the url-encoded variant: %2B
I'm also having an issue with my own repository suddenly giving "Invalid Location". Everything worked a month ago, now it doesn't on my RS814+. Tried applying your suggested change and it didn't fix the issue.
Hi Colin, Jadahl applied the fix to his repository and my DS411+II is working great on it. Can you check if your RS418+ accepts his repository? You should be able to add his repo with this URL: http://www.jadahl.com/domoticz_stable_6/
Realized my repository wasn't running the updated version, so I applied the fix, but it wasn't the only problem.
Tested http://www.jadahl.com/domoticz_stable_6/ from my RS814+ with no problems.
I actually just switched my repository to the rewritten version that @mbirth proposed here: https://github.com/jdel/sspks/pull/15
And I applied the same fix to that version. I think it's working from the feedback I've gotten: hildinger.us/sspks/
@colin1497 I'm almost sure the patch wasn't even needed as I only use the device ids to display them on the device list. But then it's all done via the architecture id.
@mbirth Thanks. I hadn't actually looked at it closely at all.
So, this can be closed, then?
the curl command works fine on packages.jdel.org which is using commit c89febd75a5477707437d0689bc80c3ddd770db4
I've been trying to add an sspks repository to my DS411+II for a while now. I thought something was wrong with my Synology, but with Synology support we found that the issue is related to sspks. Package Center shows "Invalid Location".
When we run the following curl command, we can see that sspks works correctly for DS411+, but not for DS411+II:
curl -L -A "synology_x86_411+ DSM6.1-14902 (package)" --data "package_update_channel=stable&unique=synology_x86_411+&build=14903&language=enu&major=6&arch=x86&minor=1&timezone=Amsterdam" "http://www.jadahl.com/domoticz_stable_6/"
vs
curl -L -A "synology_x86_411+II DSM6.1-14902 (package)" --data "package_update_channel=stable&unique=synology_x86_411+II&build=14903&language=enu&major=6&arch=x86&minor=1&timezone=Amsterdam" "http://www.jadahl.com/domoticz_stable_6/"
Maybe Synology changed something, but I found that the issue is related to the preg_match on line 36 of index.php.
Since the + is a special character for regular expression, this fails. The + should be escaped and I think the following suggestion is a good solution?
Change line 34 from:
$unique = trim($_POST['unique']);
to$unique = preg_quote(trim($_POST['unique']));
Thanks! Jorik