* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************/
-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
+++ /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();
-?>
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************/
-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
+++ /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();
-?>
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************/
-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;
return false;
exit;
}
-
- old_pass = hash_encrypt(document.forms.changepass.ancien.value);
-
- str = old_pass + ":" +
- document.forms.changepass.challenge.value;
- document.forms.changepass2.response.value = hash_encrypt(str);
- str = hash_xor(hash_encrypt(document.forms.changepass.nouveau.value), old_pass);
+ str = hash_encrypt(document.forms.changepass.nouveau.value);
document.forms.changepass2.response2.value = str;
-
+
alert ("Le mot de passe que tu as rentré va être chiffré avant de nous parvenir par Internet ! Ainsi il ne circulera pas en clair.");
document.forms.changepass2.submit();
return true;
}
-{/literal}
+++ /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();
-?>
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *\r
***************************************************************************/\r
\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
+++ /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();
-?>
if (Post::has('response2')) {
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.php');
- $page->assign('xorg_title','Polytechnique.org - Mon mot de passe');
- $page->trig('Ancien mot de passe erronné');
- $page->run();
- }
- $password = hash_xor(Post::get('response2'), $_SESSION['password']);
+ $password = Post::get('response2');
$_SESSION['password'] = $password;
$globals->xdb->execute('UPDATE auth_user_md5 SET password={?} WHERE user_id={?}', $password, Session::getInt('uid'));
}
new_skinned_page('motdepasse.tpl', AUTH_MDP);
-$page->addJsLink('javascript/motdepasse.js.php');
+$page->addJsLink('javascript/motdepasse.js');
$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.php');
+ $page->addJsLink('javascript/motdepasse.js');
$page->run();
}
} else {
function doLogin(&$page) {
// login for non-x has been disabled, so don't need this js anymore
- //$page->addJsLink('javascript/do_challenge_response.js.php');
+ //$page->addJsLink('javascript/do_challenge_response.js');
$page->assign("xorg_tpl", "xnet/login.tpl");
$page->run();
}
{
if (logged() and !$new_name) {
$page->changeTpl('password_prompt_logged.tpl');
- $page->addJsLink('javascript/do_challenge_response_logged.js.php');
+ $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.php');
+ $page->addJsLink('javascript/do_challenge_response.js');
$page->assign("xorg_tpl", "password_prompt.tpl");
global $globals;
</tr>
<tr>
<td class="titre">
- Ancien mot de passe :
- </td>
- <td>
- <input type="hidden" name="challenge" value="{$smarty.session.session->challenge}" />
- <input type="password" size="10" maxlength="10" name="ancien" />
- </td>
- </tr>
- <tr>
- <td class="titre">
Nouveau mot de passe :
</td>
<td>
</form>
<form action="{$smarty.server.REQUEST_URI}" method="post" id="changepass2">
<p>
-<input type="hidden" name="response" value="" />
<input type="hidden" name="response2" value="" />
</p>
</form>
<script type="text/javascript" src="{rel}/{$js}"></script>
{/foreach}
<script type="text/javascript" src="{rel}/javascript/overlib.js"></script>
+ <script type="text/javascript" src="{rel}/javascript/md5.js"></script>
+ <script type="text/javascript" src="{rel}/javascript/sha1.js"></script>
+ <script type="text/javascript" src="{rel}/javascript/secure_hash.js"></script>
{if $xorg_rss}
<link rel="alternate" type="application/rss+xml" title="{$xorg_rss.title}" href="{rel}{$xorg_rss.href}" />