thexerteproject / xerteonlinetoolkits

Xerte Online Toolkits
www.xerte.org.uk
Apache License 2.0
62 stars 60 forks source link

QR code page now giving rssproxy errors #233

Closed ronm123 closed 9 years ago

ronm123 commented 9 years ago

Seems like a recent change has broken the QR code page. Existing and new projects with this page break and give lots of rss proxy errors e.g. Notice: Undefined property: stdClass::$proxy2 in rss_proxy.php on line 35

thexerteproject commented 9 years ago

Do we still need rss_proxy?

ronm123 commented 9 years ago

Possibly not. John responded to this on dev list and in the QR code page we can change the following:

shorturl = "rss_proxy.php?rss=http://is.gd/api.php?longurl=" + pastedurl;

to just this

shorturl = "http://is.gd/api.php?longurl=" + pastedurl;

I tried that and it sort of worked but then the short url bit doesn't show only the QR code itself. That might have been a xampp/localhost limitation so plan to test on a remote installation.

thexerteproject commented 9 years ago

It's another thing that points towards the flash runtime eventually being no longer feasible: some things in that are being superceded by developments on the html5 side that don't have a lfash equivalent, and I have no appetite to maintain the flash runtime any longer.

JohnSmith-LT commented 9 years ago

I think the main problem lies with the is.gd service. Because this is a cross domain request then they need to have allowed this on their server, which they have so you can use the short version, meaning an ajax request straight to their server. Unfortunately it seems that they haven't allowed this to come from localhost so when you do it from an xampp install it fails... Perhaps there is another equivalent service that works though that we can change to using...

The main issue is that rss_proxy could probably be considered a vulnerability in xerte as it could with a bit of imagination and programming effort be used for naughtiness...

ronm123 commented 9 years ago

Hi John looks like using shorturl = "http://is.gd/api.php?longurl=" + pastedurl; doesn't only fail via localhost but fails via an exported project viewed locally too. Doesn't show an error but doesn't show the short url just the QR code. Do you know of another service we could use?

JohnSmith-LT commented 9 years ago

Hi @ronm123

I've changed some code in rss_proxy. Does that fix your problems? I don't see any errors now.

ronm123 commented 9 years ago

Hi John the errors have gone when viewing a qr code via a xampp localhost install and the short url shows again as well as the qr code. However the short url doesn't show when viewing an exported LO locally. I guess we can live with that.

JohnSmith-LT commented 9 years ago

I'll have a think about it... there may be a way that we can use a different service directly or use two different services based on situation...