--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2006 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+require_once("xorg.inc.php");
+new_nonhtml_page('javascript/do_challenge_response.js.tpl', AUTH_PUBLIC);
+header("Content-type: text/javascript");
+$page->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2006 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+require_once("xorg.inc.php");
+new_nonhtml_page('javascript/do_challenge_response_logged.js.tpl', AUTH_PUBLIC);
+header("Content-type: text/javascript");
+$page->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2006 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+require_once("xorg.inc.php");
+new_nonhtml_page('javascript/motdepasse.js.tpl', AUTH_PUBLIC);
+header("Content-type: text/javascript");
+$page->run();
+?>
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2006 Polytechnique.org *
+ * http://opensource.polytechnique.org/ *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+require_once("xorg.inc.php");
+new_nonhtml_page('javascript/secure_hash.js.tpl', AUTH_PUBLIC);
+header("Content-type: text/javascript");
+$page->run();
+?>
require_once('secure_hash.inc.php');
if (hash_encrypt($_SESSION['password'].":".$_SESSION['session']->challenge) != Post::get('response')) {
new_skinned_page('motdepasse.tpl', AUTH_MDP);
- $page->addJsLink('javascript/motdepasse.js');
+ $page->addJsLink('javascript/motdepasse.js.php');
$page->assign('xorg_title','Polytechnique.org - Mon mot de passe');
$page->trig('Ancien mot de passe erronné');
$page->run();
}
new_skinned_page('motdepasse.tpl', AUTH_MDP);
-$page->addJsLink('javascript/motdepasse.js');
+$page->addJsLink('javascript/motdepasse.js.php');
$page->assign('xorg_title','Polytechnique.org - Mon mot de passe');
$page->run();
?>
$page->run();
} else {
new_skinned_page('motdepasse.tpl', AUTH_PUBLIC);
- $page->addJsLink('javascript/motdepasse.js');
+ $page->addJsLink('javascript/motdepasse.js.php');
$page->run();
}
} else {
// {{{ doLogin
function doLogin(&$page) {
- $page->addJsLink('javascript/md5.js');
- $page->addJsLink('javascript/do_challenge_response.js');
+ // login for non-x has been disabled, so don't need this js anymore
+ //$page->addJsLink('javascript/do_challenge_response.js.php');
$page->assign("xorg_tpl", "xnet/login.tpl");
$page->run();
}
if (Session::has('session')) {
$session =& Session::getMixed('session');
}
-
if (Env::has('username') && Env::has('response') && isset($session->challenge))
{
// si on vient de recevoir une identification par passwordpromptscreen.tpl
*/
function doLogin(&$page, $new_name=false)
{
- $page->addJsLink('javascript/secure_hash.js');
- if (logged() and !$new_name) {
- $page->changeTpl('password_prompt_logged.tpl');
- $page->addJsLink('javascript/do_challenge_response_logged.js');
- $page->assign("xorg_tpl", "password_prompt_logged.tpl");
- $page->run();
- } else {
- $page->changeTpl('password_prompt.tpl');
- $page->addJsLink('javascript/do_challenge_response.js');
- $page->assign("xorg_tpl", "password_prompt.tpl");
+ if (logged() and !$new_name) {
+ $page->changeTpl('password_prompt_logged.tpl');
+ $page->addJsLink('javascript/do_challenge_response_logged.js.php');
+ $page->assign("xorg_tpl", "password_prompt_logged.tpl");
+ $page->run();
+ } else {
+ $page->changeTpl('password_prompt.tpl');
+ $page->addJsLink('javascript/do_challenge_response.js.php');
+ $page->assign("xorg_tpl", "password_prompt.tpl");
global $globals;
if ($globals->mail->alias_dom) {
$page->assign("r_domain", Cookie::get('ORGdomain', 'login'));
}
$page->run();
- }
- exit;
+ }
+ exit;
}
// }}}
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************/
-document.write('<script language="javascript" src="javascript/secure_hash.js"></script>');
+document.write('<script language="javascript" src="{rel}/javascript/secure_hash.js.php"></script>');
+{literal}
function correctUserName() {
var u = document.forms.login.username;
// login with no space
document.forms.loginsub.submit();
}
+{/literal}
\ No newline at end of file
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************/
-document.write('<script language="javascript" src="javascript/secure_hash.js"></script>');
+document.write('<script language="javascript" src="{rel}/javascript/secure_hash.js.php"></script>');
+{literal}
function readCookie(name)
{
var nameEQ = name + "=";
document.forms.login.password.value = "";
document.forms.loginsub.submit();
}
+{/literal}
\ No newline at end of file
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************/
-document.write('<script language="javascript" src="javascript/secure_hash.js"></script>');
+document.write('<script language="javascript" src="{rel}/javascript/secure_hash.js.php"></script>');
+{literal}
function EnCryptedResponse() {
pw1 = document.forms.changepass.nouveau.value;
pw2 = document.forms.changepass.nouveau2.value;
document.forms.changepass2.submit();
return true;
}
+{/literal}
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *\r
***************************************************************************/\r
\r
-document.write('<script language="javascript" src="javascript/md5.js"></script>');\r
-document.write('<script language="javascript" src="javascript/sha1.js"></script>');\r
+document.write('<script language="javascript" src="{rel}/javascript/md5.js"></script>');\r
+document.write('<script language="javascript" src="{rel}/javascript/sha1.js"></script>');\r
\r
+{literal}\r
function hash_encrypt(a) {\r
return hex_sha1(a);\r
}\r
c += a.charAt(k);\r
return c;\r
}\r
+{/literal}\r