New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge CVS history #1

merged 80 commits into from Apr 17, 2017


None yet
2 participants

fwolf commented Oct 16, 2013

I have done a new cvs export job using, got all commit history from, and then merged with your modified

During merge, sourceforge version seems newer in version(1.2.5-dev) and some author mail address.

Although this class has not much usage because there are curl already, I think keep a copy here is good for some old project.

andrei and others added some commits Feb 3, 2000

gene_wood and others added some commits Jul 25, 2004

Fixing BUG # 912060 Undefined variable: postdata
The postdata variable isn't initialized in the _prepare_post_body() function causing a "Notice" error.
Fix for BUG 626849 submitted by Tajh Leitso Corrects the redirect fun…
…ction under the submit functions. When submitting (POST) if a redirect is encountered, it is assumed to also be a POST.

This fix allows for a redirect from a POST to lead to a page that should be pulled with a GET
Fix for BUG 626849 submitted by Tajh Leitso Removes quotes from an ht…
…tps url to prevent escaping from the curl command line and executing commands.

Also added a temp_dir variable instead of hardcoding the temporary file with the curl command in it to /tmp
Fixed bug 999079 .This is caused by the preg_replace functions in the…
… _exapandlinks function.

I tried to decode which regex was causing this but was
unable to, so I just added an additional regex to remove the
trailing slash from the URI before the page is concatenated
onto the end of it.
My new regex is :

		$match = preg_replace("|/$|","",$match);

This isn't elegant but it works. If anyone wants to
determine which of the 6 other regexes being run is causing
the double slashes, I'd be happy to fix it and take out my
additional line of code.
Fixed BUG 1014823
Meta redirect regex inaccurate

The original regex was expecting 1 or more whitespaces between the semicolon and the URL in the http refresh. This is not always that case.


The new line expects 0 or more whitespaces between the semicolon and the URL

Bug fix of Bug # 864047 pertaining to Root relative links and the _ex…
…pandlinks function.

Root relative links are treated as relative
Snoopy is treating root relative links as relative.

When a page at has a link
like /foo/bar/page2.htm then Snoopy returns the link to
page 2 as: instead
Fixed Bug # 1077870
Snoopy now allows a meta refresh tag to have any number of spaces between the semicolon following the refresh delay and the URL= value.
Bug Fix # 1086830
Added :
	$URI = $this->lastredirectaddr;

into the fetchlinks, submitlinks and submitext functions to properly expandlinks after a redirect.

Also modified the documentation at the beginning of the file indicating which functions use expandlinks
Security fix for potential arbitrary command exploit. The http header…
…s in the https curl request weren't being checked for double quotes (the URI was, but not the headers).

Here's the description of the exploit from SEC.

SEC-CONSULT Security Advisory < 2005xxxx-0 >
                  title: Snoopy Remote Code Execution Vulnerability
                program: Snoopy PHP Webclient
     vulnerable version: 1.2 and earlier
                  found: 2005-10-10
                     by: D. Fabian / SEC-CONSULT /

vendor description:

Snoopy is a PHP class that simulates a web browser. It automates the
task of retrieving web page content and posting forms, for example.

Snoopy is used by various RSS parser, which are in turn used in a
whole bunch of applications like weblogs, content management systems,
and many more.

vulnerabilty overview:

Whenever an SSL protected webpage is requested with one of the many
Snoopy API calls, it calls the function _httpsrequest which takes
the URL as argument. This function in turn calls the PHP-function
exec with unchecked user-input. Using a specially crafted URL, an
attacker can supply arbitrary commands that are executed on the web
server with priviledges of the web user.

While the vulnerability can not be exploited using the Snoopy class
file itself, there may exist implementations which hand unchecked
URLs from users to snoopy.

proof of concept:

Consider the following code on a webserver:
fixed bug # 1328793 : fetch is case sensetive when it comes to the sc…
…heme (http / https) fixed a typo that I introduced in 1.2.2 (the first character of the file is a "z" updated the version variable in the code to reflect the new version

@hurrycaner hurrycaner merged commit 1e00198 into hurrycaner:master Apr 17, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment