[pLog-svn] r1958 - plugins/trunk/atom/class/xml/atom

oscar at devel.plogworld.net oscar at devel.plogworld.net
Fri May 6 21:35:50 GMT 2005


Author: oscar
Date: 2005-05-06 21:35:50 +0000 (Fri, 06 May 2005)
New Revision: 1958

Modified:
   plugins/trunk/atom/class/xml/atom/wsseauthentication.class.php
Log:
finally I got the WSSE authentication working... about time!

Modified: plugins/trunk/atom/class/xml/atom/wsseauthentication.class.php
===================================================================
--- plugins/trunk/atom/class/xml/atom/wsseauthentication.class.php	2005-05-06 21:35:01 UTC (rev 1957)
+++ plugins/trunk/atom/class/xml/atom/wsseauthentication.class.php	2005-05-06 21:35:50 UTC (rev 1958)
@@ -56,24 +56,18 @@
 			AtomLogger::Log( "Using password = $password" );
 
 			// no authentication... everybody is happy :)
-			if( !WSSE_AUTHENTICATION_DISABLED ) {
+			if( WSSE_AUTHENTICATION_DISABLED ) {
 			     AtomLogger::Log( "WARNING: authentication disabled!" );
 			     return true;		
 			 }
 
-			// and compute the wsse password digest
-			$body = $this->nonce.$this->created.$password;
-			AtomLogger::Log( "body = $body" );
-			//$passwordDigest = base64_encode(pack("H*", sha1($body)));
-			$passwordDigest = base64_encode(pack("H*", sha1($body)));
+            // fscking hell, it took me forever to figure out how this worked... 			
+			$passwordDigest = base64_encode(pack("H*",SHA1::sha1(base64_decode($this->nonce).$this->created.$password)));
 		
 			AtomLogger::Log( "pLog's computed password digest: $passwordDigest" );
 
 			// finally, compare if they are the same or not...
-			if( $passwordDigest == $this->passwordDigest )
-				return true;
-			else
-				return false;
+			return( $passwordDigest == $this->passwordDigest );
 		}
 
 		/**




More information about the pLog-svn mailing list