Date: 12/09/99
- Next message: aanneck: "[PHPLIB-DEV] cvs commit"
- Previous message: Stanislav Malyshev: "Re: [PHPLIB-DEV] Small bug"
- Next in thread: aanneck: "[PHPLIB-DEV] cvs commit"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
From: aanneck
Date: Thu Dec 9 11:43:22 1999
Modified files:
php-lib/php/crcloginform.ihtml
Log message:
I changed the way JS writes into the document.
Instead of trying to write into the password input field (wich does not
work on linux NS) it writes now into a 2nd form that only has hidden fields.
Overwriting hidden input type fields values works with all browsers I could
do tests with.
I barely introduced this change into our my site (2 days) and would
appreciate QA on my changes. -andre
Index: php-lib/php/crcloginform.ihtml
diff -u php-lib/php/crcloginform.ihtml:1.3 php-lib/php/crcloginform.ihtml:1.4
--- php-lib/php/crcloginform.ihtml:1.3 Fri Oct 29 15:55:13 1999
+++ php-lib/php/crcloginform.ihtml Thu Dec 9 11:43:21 1999
@@ -16,41 +16,49 @@
Modified for hashed password storage by Jim Zajkowski <jim <email protected>>
+ Changed the way of submitting the challenge:response with a 2nd login form.
+ This fixes the problems some browsers have with overwriting the content of
+ a password type input tag. <andre <email protected>>
+
-->
+
<html>
<head>
- <title>Test for Login</title>
+ <title>Login into the copmunity Catalog Administrator</title>
<style type="text/css">
<!--
body { font-family: Arial, Helvetica, sans-serif }
td { font-family: Arial, Helvetica, sans-serif }
-->
</style>
-<script language="javascript" src="/md5.js"></script>
+<script language="javascript" src="md5.js"></script>
<script language="javascript">
+
<!--
function doChallengeResponse() {
str = document.login.username.value + ":" +
MD5(document.login.password.value) + ":" +
document.login.challenge.value;
-
- document.login.response.value = MD5(str);
- document.login.password.value = "";
- document.login.submit();
+ document.logintrue.username.value = document.login.username.value;
+ document.logintrue.response.value = MD5(str);
+ document.logintrue.submit();
}
// -->
+
</script>
</head>
<body bgcolor="#ffffff">
-<h1>Test for Login</h1>
+<DIV ALIGN="center">
+<h1>Compunity Import Tool</h1>
-Welcome!
+Welcome!<BR>
Please identify yourself with a username and a password:<br>
+</DIV>
<form name="login" action="<?php print $this->url() ?>" method=post>
-<table border=0 bgcolor="#eeeeee" align="center" cellspacing=0 cellpadding=4>
+<table border=2 bgcolor="#eeeeee" align="center" cellspacing=0 cellpadding=4>
<tr valign=top align=left>
<td>Username:</td>
<td><input type="text" name="username" value="<?php print (isset($this->auth["uname"]) ? $this->auth["uname"] : "" ) ?>" size=32 maxlength=32></td>
@@ -58,33 +66,37 @@
<tr valign=top align=left>
<td>Password:</td>
- <td><input type="password" name="password" size=32 maxlength=32></td>
+ <td><input type="password" name="password" size=32 maxlength=32 value=""></td>
</tr>
<tr>
- <td> </td>
- <td align=right><input onClick="doChallengeResponse(); return false;" type="submit" name="submitbtn" value="Login now"></td>
+ <td colspan=2 align=center><A HREF="javascript:doChallengeResponse();">login</A></td>
</tr>
</table>
- <?php if ($this->auth["error"]): ?>
+ <?php global $username; if ( isset($username) ): ?>
<!-- failed login code -->
- <p>
+<DIV ALIGN="CENTER">
<table>
<tr>
- <td colspan=2><font color=red><b><?php print $this->auth["error"]; ?></b></font></td>
+ <td colspan=2 align=center><font color=red><b>Either your username or your password
+ are invalid.<br>
+ Please try again!</b></font></td>
</tr>
</table>
-
- <?php
- $this->auth["error"] = "";
- endif;
- ?>
+</DIV>
+ <?php endif ?>
</table>
<!-- Set up the form with the challenge value and an empty reply value -->
+<input type="hidden" name="challenge" value="<?php print $challenge ?>">
+<input type="hidden" name="response" value="">
+</form>
+
+<form name="logintrue" action="<?php print $this->url() ?>" method=post>
+<input type="hidden" name="username" value="">
<input type="hidden" name="challenge" value="<?php print $challenge ?>">
<input type="hidden" name="response" value="">
</form>
-
PHPLIB Developers Mailing List. Send messages to <phplib-dev <email protected>>.
To unsubscribe, send "unsubscribe" to <phplib-dev-request <email protected>> in
the body, not the subject, of your message.
- Next message: aanneck: "[PHPLIB-DEV] cvs commit"
- Previous message: Stanislav Malyshev: "Re: [PHPLIB-DEV] Small bug"
- Next in thread: aanneck: "[PHPLIB-DEV] cvs commit"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

