I'm encountering the problem while working on NOMY, what is essentially a web front end for wget combined with an iframe for browsing the cached files.
Not sure if it is accurate to call this a proxy.. There is a super-ugly part in the javascript where it assumes it only takes 3 seconds after each link is submitted to be cached.. It should be hinged to the wget request but I'm not quite sure how to do that.
Well the entire function stack is pretty convoluted. When I click on a feed title from within my cms, it sends a $.get request to fetch_single_rss.php which instantiates a Feed object that returns the array generated by the above function. It then formats the items into JSON and outputs it, which is then processed by my javascript and appended in the appropriate place.
After some recent digging, the strange thing is that if I go directly to fetch_single_rss.php and look at the output for a feed that is failing, it is there and looks fine! So it must be failing in the javascript somewhere.. but the javascript works for almost every other feed. The even stranger thing is that if I break fetch_single_rss.php in such a way that it outputs something that should in no way fail (like 'doo' for title and 'woo' for url) it still fails!
It is the user experience not the machinery that is important. If you can suggest a specific modification to the code that would improve performance I would be most appreciative. "I didn't even look at it, use a framework." is perhaps the least helpful thing you could say.
I'm trying to enumerate the potential vulnerabilities present in the line. Most are old and obvious, but there might exist something more subtle or new.
Well I was wondering if there were any other vulnerabilities besides simply output sanitizing that I was not considering, like a buffer overflow or something.
What you want is to download XAMPP for each platform, pick a random 127.x.x.x address for your app. 127.22.33.55, for instance, and a random port (because they may have port 80 running via skype or a browser). Then, rig your app so that it starts at http://127.22.33.55:15572/, for instance. Then create a bat file that 1) starts xampp; 2) opens up the browser to that page, and 3) closes xampp when the commandline window is closed. Voila. Crossplatform, self-contained PHP project. There are a few commercial apps that do this at steep premiums fyi.
Update: My problem was not what I thought it was. It was a combination of my chat script truncating the links and/or URLS with question marks causing wget to fail... I think.
I'm encountering the problem while working on NOMY, what is essentially a web front end for wget combined with an iframe for browsing the cached files.
Link to your app source? I don't see any downloads or ways to use http://www.redditmirror.cc/ .. is that it?
What's wrong with wget?
Not sure if it is accurate to call this a proxy.. There is a super-ugly part in the javascript where it assumes it only takes 3 seconds after each link is submitted to be cached.. It should be hinged to the wget request but I'm not quite sure how to do that.
Does it ensure the uploaded file is an image (by running it through gd or something) ?
You talk funny!
edit: Oh come on I'm joking lighten up!
But would you do it all in one big long script or break it up somehow into bite sized chunks?
Well I solved my problem, it had to do with a short timeout on a get request.
It was a javascript error log, and I found my problem- it was a short timeout on the get request.
Failed:
[19:15:05.915] GET http://localhost/asg/rss/fetch_single_rss.php?feed_id=386 [undefined 2478ms]
Worked:
[19:14:57.653] GET http://localhost/asg/rss/fetch_single_rss.php?feed_id=387 [HTTP/1.1 200 OK 432ms]
Found the problem! I had a really short timeout on the get request (2.5s)!
Well the entire function stack is pretty convoluted. When I click on a feed title from within my cms, it sends a $.get request to fetch_single_rss.php which instantiates a Feed object that returns the array generated by the above function. It then formats the items into JSON and outputs it, which is then processed by my javascript and appended in the appropriate place.
After some recent digging, the strange thing is that if I go directly to fetch_single_rss.php and look at the output for a feed that is failing, it is there and looks fine! So it must be failing in the javascript somewhere.. but the javascript works for almost every other feed. The even stranger thing is that if I break fetch_single_rss.php in such a way that it outputs something that should in no way fail (like 'doo' for title and 'woo' for url) it still fails!
I'm not sure my problem is CDATA anymore.. It is strange and intermittent.
Well dubya tee eff! The crazy cms I'm using it in is here if you are interested.
It is the user experience not the machinery that is important. If you can suggest a specific modification to the code that would improve performance I would be most appreciative. "I didn't even look at it, use a framework." is perhaps the least helpful thing you could say.
Are you?
Which you can download here.
I didn't make it, somebody (in this very thread!) recommended it and I hadn't looked for an alternative.
Session data is only user input in the situation presented in this post, it is entirely server side otherwise.
I'm trying to enumerate the potential vulnerabilities present in the line. Most are old and obvious, but there might exist something more subtle or new.
But only that variable.
Good point, I have added "and only used in parameterized PDO queries."
Well I was wondering if there were any other vulnerabilities besides simply output sanitizing that I was not considering, like a buffer overflow or something.
A friend sent me this regarding my question:
Update: My problem was not what I thought it was. It was a combination of my chat script truncating the links and/or URLS with question marks causing wget to fail... I think.
I'm just trying to mirror articles.