Changeset 1343

Show
Ignore:
Timestamp:
04/01/08 23:05:56 (6 months ago)
Author:
networkfusion
Message:

* Fixed #325 password validation

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wifidog-auth/CHANGELOG

    r1342 r1343  
    11# $Id$ 
     2 
     32008-04-02 Robin Jones 
     4        * Fixed #325 password validation 
     5        * Added a new banner for the install script 
     6 
    272008-04-01 Benoit GrĂ©goire  <bock@step.polymtl.ca> 
    38        * Apply patch from dc.ml@oxys.net to allow commas in authentication parameter strings.  This is sometimes necessary for LDAP, and fixes #342 
    49 
    5102008-03-31 Robin Jones 
    6     * Minor install script improvements, including making changelog accessible and colour in the permissions tables 
     11        * Minor install script improvements, including making changelog accessible and colour in the permissions tables 
    712 
    8132008-03-21 Benoit GrĂ©goire  <bock@step.polymtl.ca> 
  • trunk/wifidog-auth/wifidog/install.php

    r1341 r1343  
    119119    } 
    120120  </SCRIPT> 
    121  
     121                <script src="js/formutils.js" type="text/javascript"></script> 
    122122<link rel="stylesheet" type="text/css" href="media/base_theme/stylesheet.css" /> 
    123123</HEAD> 
     
    183183 
    184184    <div id="main_area_top"> 
    185         <table align="center"><tr><td><img src="media/base_theme/images/wifidog_logo_banner.png" /></td></tr></table> 
     185        <table align="center"><tr><td><img src="media/base_theme/images/wifidog_install_banner.png" /></td></tr></table> 
    186186    </div> 
    187187    <div id="main_area_middle"> 
     
    558558            refreshButton(); 
    559559            navigation(array(array("title" => "Back", "page" => "Database"))); 
    560             die(); 
     560            #die(); - causes inability go go back and change values 
    561561            break; 
    562562        } 
     
    884884        </table> 
    885885 
    886         <script type="text/javascript"> // TODO: check whether user already exists 
    887           function submitValue() { 
    888         if (document.myform.username.value == '') { 
     886        <script type="text/javascript"> 
     887           
     888         
     889        function submitValue() { 
     890 
     891        if (isEmpty(document.myform.username)) { 
    889892              alert('Please enter a username'); 
    890893              exit(); 
     
    894897              exit(); 
    895898            } 
    896             if (document.myform.password.value == '') { 
     899        if (isEmpty(document.myform.password)) { 
    897900              alert('Please enter a valid password'); 
    898901              exit(); 
    899902            } 
    900         re = /^[0-9a-zA-Z]{6,}$/; 
    901             if (!re.test(document.myform.password.value)) { 
     903 
     904        if (!isValidPassword(document.myform.password)) { 
    902905              alert('Your password does not meet complexity requirements. 6 letters and/or numbers '); 
    903906              exit(); 
    904907            } 
    905908 
    906             if (document.myform.email.value == '') { 
     909        if (!isValidEmail(document.myform.email)) { 
    907910              alert('Please enter a valid email address'); 
    908911              exit(); 
    909912            } 
    910             document.myform.page.value='admin'; 
    911             document.myform.action.value='create'; 
    912             document.myform.submit(); 
     913        document.myform.page.value='admin'; 
     914        document.myform.action.value='create'; 
     915        document.myform.submit(); 
    913916          } 
    914917        </script>