]> andersk Git - sql-web.git/commitdiff
index redirects to vhost when on home tab
authorJoe Presbrey <presbrey@mit.edu>
Thu, 17 Aug 2006 21:33:43 +0000 (21:33 +0000)
committerJoe Presbrey <presbrey@mit.edu>
Thu, 17 Aug 2006 21:33:43 +0000 (21:33 +0000)
signup produces more random password

git-svn-id: svn://presbrey.mit.edu/sql/mitsql@108 a142d4bd-2cfb-0310-9673-cb33a7e74f58

batch/signup.php
index.php
tpl/menu.php

index 1bb7cd86e851ba9f416f094ac97ae5fd6e7491b8..78655427cf425f09385e1e5bf3f25a767106b4ef 100755 (executable)
@@ -17,7 +17,7 @@ if (count($hesinfo)>=4) {
        $myName = $myUsername;
 }
 $myEmail = $myUsername.'@mit.edu';
-$myPassword = substr(uniqid(),0,7);
+$myPassword = substr(md5(uniqid(),0,8));
 
 if ($myUID<1000) exit('bad UID');
 
index 7cceea03cfd527c5a17489ad1d76cb07f2175a0e..e8259684d013d8a624e47e291c8f7ee75c40c599 100755 (executable)
--- a/index.php
+++ b/index.php
@@ -10,6 +10,8 @@ require_once('mitsql.cfg.php');
 require_once('mitsql.lib.php');
 
 isLoggedIn() && redirect('main');
+!DEBUG && $_SERVER['SERVER_NAME'] != 'sql.mit.edu' && redirect2('http://sql.mit.edu/');
+
 //$LoginSSL->canSignup() && redirect('signup');
 //redirect('login');
 
index ea2347c63b92140c3359595bef29f981528b7575..b96bb464febd04d5a27a84f3602ae6ab15119b6c 100644 (file)
@@ -22,7 +22,11 @@ Logged in: <em><?=$loggedInText?>@<?=DBHOST?></em>&nbsp;
 <div style="float:left;">
 <li><a href="do/signup">Sign up</a></li>
 <li><a href="https://scripts.mit.edu/~sql/phpMyAdmin/" target="_blank">phpMyAdmin</a></li>
+<?php if (DEBUG) { ?>
 <li><a href="do/index">Home</a></li>
+<?php } else { ?>
+<li><a href="http://sql.mit.edu/">Home</a></li>
+<?php } ?>
 </div>
 <div style="text-align: right;">
 Login via: <li><a href="do/login?ssl=0">SQL Password</a></li><li><a href="do/login?ssl=1">MIT Certificate</a></li>
This page took 0.051935 seconds and 5 git commands to generate.