SourceForge logo
SourceForge logo
Menu

phpwiki-checkins

From: Geoffrey T. D. <da...@us...> - 2001年07月20日 17:40:15
Update of /cvsroot/phpwiki/phpwiki/lib
In directory usw-pr-cvs1:/tmp/cvs-serv1029/lib
Modified Files:
	userauth.php 
Log Message:
Added support for bogo-logins.
One can now "login" using any WikiWord as a user ID.
(Unless logging in as the admin user, any password will work.)
Currently, the sole effect of logging in is that the
the logged-in user ID is recorded as the author of any
page edits. Thus, "logging in" allows one to control
the author which appears in RecentChanges and the page
info display.
Index: userauth.php
===================================================================
RCS file: /cvsroot/phpwiki/phpwiki/lib/userauth.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** userauth.php	2001年05月31日 17:43:05	1.6
--- userauth.php	2001年07月20日 17:40:12	1.7
***************
*** 137,146 ****
 function _get_http_authenticated_userid () {
 global $PHP_AUTH_USER, $PHP_AUTH_PW;
! 
! if (empty($PHP_AUTH_USER) || empty($PHP_AUTH_PW))
 	 return false;
 
! if (($PHP_AUTH_USER != ADMIN_USER) || ($PHP_AUTH_PW != ADMIN_PASSWD))
 	 return false;
 	 
 return $PHP_AUTH_USER;
--- 137,155 ----
 function _get_http_authenticated_userid () {
 global $PHP_AUTH_USER, $PHP_AUTH_PW;
! global $WikiNameRegexp;
! 
! if (empty($PHP_AUTH_USER))
 	 return false;
 
! if ($PHP_AUTH_USER == ADMIN_USER) {
! 	 if (empty($PHP_AUTH_PW) || $PHP_AUTH_PW != ADMIN_PASSWD)
! 	 return false;
! }
! else if (! ALLOW_BOGO_LOGIN) {
! 	 return false;
! }
! else if (! preg_match('/\A' . $WikiNameRegexp . '\z/', $PHP_AUTH_USER)) { 	
 	 return false;
+ }
 	 
 return $PHP_AUTH_USER;
***************
*** 164,168 ****
 if (ACCESS_LOG)
 	 $LogEntry->status = 401;
! echo gettext ("You entered an invalid login or password.");
 ExitWiki();
 }
--- 173,183 ----
 if (ACCESS_LOG)
 	 $LogEntry->status = 401;
! echo "<p>" . gettext ("You entered an invalid login or password.") . "\n";
! if (ALLOW_BOGO_LOGIN) {
! 	 echo "<p>";
! 	 echo gettext ("You can log in using any valid WikiWord as a user ID.") . "\n";
! 	 echo gettext ("(Any password will work, except, of course for the admin user.)") . "\n";
! }
! 
 ExitWiki();
 }
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /