[wp-hackers] Re: [wp-svn] [4980] trunk/wp-includes/cron.php: Fix spawning with SSL.

Robin Adrianse robin.adr at gmail.com
Wed Mar 7 04:12:58 GMT 2007


Added new patch.

On 3/6/07, Robert Deaton <false.hopes at gmail.com> wrote:
>
> This needs a check to make sure OpenSSL support is compiled in.
> Checking for the existence of one of the functions at
> http://php.net/openssl should do.
>
> On 3/6/07, m at wordpress.org <m at wordpress.org> wrote:
> >
> >
> >  Revision 4980 Author ryan Date 2007-03-07 01:47:57 +0000 (Wed, 07 Mar
> 2007)
> > Log Message Fix spawning with SSL. Props dragonhard and rob1n. fixes
> #3765
> >
> > Modified Paths
> >
> > trunk/wp-includes/cron.php
> >
> > Diff
> > Modified: trunk/wp-includes/cron.php (4979 => 4980)
> > --- trunk/wp-includes/cron.php 2007-03-07 01:44:53 UTC (rev 4979)
> > +++ trunk/wp-includes/cron.php 2007-03-07 01:47:57 UTC (rev 4980)
> > @@ -83,8 +83,18 @@
> >
> >  $cron_url = get_option( 'siteurl' ) . '/wp-cron.php';
> >  $parts = parse_url( $cron_url );
> > -
> > - $argyle = @ fsockopen( $parts['host'], $_SERVER['SERVER_PORT'],
> $errno,
> > $errstr, 0.01 );
> > +
> > + if ($parts['scheme'] == 'https') {
> > + // support for SSL was added in 4.3.0
> > + if (version_compare(phpversion(), '4.3.0', '>=')) {
> > + $argyle = @fsockopen('ssl://' . $parts['host'],
> $_SERVER['SERVER_PORT'],
> > $errno, $errstr, 0.01);
> > + } else {
> > + return false;
> > + }
> > + } else {
> > + $argyle = @ fsockopen( $parts['host'], $_SERVER['SERVER_PORT'],
> $errno,
> > $errstr, 0.01 );
> > + }
> > +
> >  if ( $argyle )
> >  fputs( $argyle,
> >  "GET {$parts['path']}?check=" . md5(DB_PASS . '187425') . "
> HTTP/1.0\r\n"
> >
> >
> > _______________________________________________
> > wp-svn mailing list
> > wp-svn at lists.automattic.com
> > http://lists.automattic.com/mailman/listinfo/wp-svn
> >
> >
>
>
> --
> --Robert Deaton
> http://lushlab.com
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>


More information about the wp-hackers mailing list