PHP-OpenID-0.0.8.2 released

Christian Stocker christian.stocker at bitflux.ch
Thu Sep 8 10:12:18 PDT 2005


Hi

Another Bug:

trustroot.php, method isSane(), line 97:
  if( $cnt > 1) && strlen($host_parts[$cnt-2]) <= 3) {

Doesn't parse for example

greg.abstrakt.ch

correctly (and a lot of other internationally common domains).

I assume the check is for things like example.co.uk etc.

I don't know, how to make that more correct (not sure, what it actually
should reject and what not), but removing "&&
strlen($host_parts[$cnt-2]) <= 3" helped for the time beeing

And, shall I report bugs here on this list in the future or just
directly to dan?

chregu


On 8.9.2005 18:44 Uhr, Christian Stocker wrote:
> Hi
> 
> On 8.9.2005 18:28 Uhr, Dan Libby wrote:
> 
>>Hi Christian.   Thanks for the report.  I'll play around without the
>>extensions and SCRIPT_URI to make sure the examples still work.
>>
>>One thing though... I already applied the SCRIPT_URI patch from Martin
>>Atkins.  You are saying you had to make additional changes?  What were
>>
> 
> Attached is the patch. The first part is not totally correct as far as I
> can see, but you know now, where to look for. And the second part in
> sampleserver.php is only my hardcoded URL :) Hope it helps nevertheless.
> 
> by the way, I took your library and integrated OpenID support in our
> CMS. It's only a server yet (and basically just your sampleserver.php
> with the authentication from our framework). Should also  be a consumer
> later. See
> <http://devblog.flux-cms.org/archive/2005/09/08/flux-cms-as-openid-server.html>
> for more details
> 
> Thanks a lot for the library and I wanted to start with an AJAX demo,
> but didn't get very far. The JS part isn't the problem, but the helper
> part as in http://danga.com/openid/demo/helper.bml.txt. I have no idea
> where to start for that :)
> 
> chregu
> 
> 
> 
> 
> 
> they?
> 
>>-dan
>>
>>Christian Stocker wrote:
>>
>>
>>
>>>Hi
>>>
>>>On 8.9.2005 11:33 Uhr, Dan Libby wrote:
>>>
>>>
>>>
>>>
>>>>Just a minor bugfix release.
>>>>
>>>>http://www.videntity.org/tp/downloads/PHP-OpenID-0.0.8.2.tar.bz2
>>>>
>>>>fwiw, I've now tested both simple.php and httpconsumer.php with
>>>>Livejournal, and achieved successful logins with both using this version.
>>>>  
>>>>
>>>
>>>Nice. Works (simple, httpconsumer and sampleserver), if I install your
>>>recommended extension (gmp, mhash, curl, and tidy2). Without gmp and
>>>mhash it didn't work, but I'm too busy/lazy right now to check that
>>>further. As long as it works for me :)
>>>
>>>Furthermore there's the issue of SCRIPT_URI, which is not set on my
>>>server (apache2, mod_php5, linux) and I had to change some lines
>>>(mentioned in the mail by Martin Atkins).
>>>
>>>Now that the examples work, I'll try to integrate them into our
>>>applications. Thanks a lot for your work
>>>
>>>christian
>>>
>>>
> 
> 
> 
> ------------------------------------------------------------------------
> 
> diff -u ../../PHP-OpenID-0.0.8.2/examples/httpconsumer.php ./httpconsumer.php
> --- ../../PHP-OpenID-0.0.8.2/examples/httpconsumer.php  2005-09-06 08:26:44.000000000 +0200
> +++ ./httpconsumer.php  2005-09-08 12:14:56.000000000 +0200
> @@ -364,7 +364,7 @@
>      $consumer = new SampleConsumer($http_client, $assoc_mngr);
>  
>      // print 'Consumer Server running...'
> -    $handler = new ConsumerHandler( $consumer, $_SERVER['SCRIPT_URI'], $split, $dumb );
> +    $handler = new ConsumerHandler( $consumer,isset($_SERVER['SCRIPT_URI']) ? $_SERVER['SCRIPT_URI'] : 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'], $split, $dumb );
>      $handler->do_GET();
>  }
>  
> diff -u ../../PHP-OpenID-0.0.8.2/examples/sampleserver.php ./sampleserver.php
> --- ../../PHP-OpenID-0.0.8.2/examples/sampleserver.php  2005-09-06 08:26:38.000000000 +0200
> +++ ./sampleserver.php  2005-09-08 18:37:26.000000000 +0200
> @@ -38,8 +38,7 @@
>  require_once( '../openid/server.php' );
>  require_once( '../openid/association.php' );
>  
> -define( 'addr',  isset( $_SERVER['PATH_INFO'] ) ? str_replace( $_SERVER['PATH_INFO'], '', $_SERVER['SCRIPT_URI'] ) : $_SERVER['SCRIPT_URI'] );
> -
> +define('addr','http://php5.bitflux.org/openid/examples/sampleserver.php');
>  // define some paths to be used for maintaining state in this example server.
>  // May need to adjust for non-unix OS. Will attempt to create if not pre-existing.
>  //

-- 
christian stocker | Bitflux GmbH | schoeneggstrasse 5 | ch-8004 zurich
phone +41 1 240 56 70 | mobile +41 76 561 88 60  | fax +41 1 240 56 71
http://www.bitflux.ch | christian.stocker at bitflux.ch |  GPG 0x5CE1DECB


More information about the yadis mailing list