| 1 | {**************************************************************************} |
| 2 | {* *} |
| 3 | {* Copyright (C) 2003-2008 Polytechnique.org *} |
| 4 | {* http://opensource.polytechnique.org/ *} |
| 5 | {* *} |
| 6 | {* This program is free software; you can redistribute it and/or modify *} |
| 7 | {* it under the terms of the GNU General Public License as published by *} |
| 8 | {* the Free Software Foundation; either version 2 of the License, or *} |
| 9 | {* (at your option) any later version. *} |
| 10 | {* *} |
| 11 | {* This program is distributed in the hope that it will be useful, *} |
| 12 | {* but WITHOUT ANY WARRANTY; without even the implied warranty of *} |
| 13 | {* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *} |
| 14 | {* GNU General Public License for more details. *} |
| 15 | {* *} |
| 16 | {* You should have received a copy of the GNU General Public License *} |
| 17 | {* along with this program; if not, write to the Free Software *} |
| 18 | {* Foundation, Inc., *} |
| 19 | {* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *} |
| 20 | {* *} |
| 21 | {**************************************************************************} |
| 22 | |
| 23 | |
| 24 | <h1> |
| 25 | Changer de mot de passe |
| 26 | </h1> |
| 27 | |
| 28 | <p> |
| 29 | Ton mot de passe doit faire au moins <strong>6 caractères</strong> quelconques. Attention |
| 30 | au type de clavier que tu utilises (qwerty?) et aux majuscules/minuscules. |
| 31 | </p> |
| 32 | <p> |
| 33 | Pour une sécurité optimale, ton mot de passe circule de manière cryptée (https) et est |
| 34 | stocké crypté irréversiblement sur nos serveurs. |
| 35 | </p> |
| 36 | <br /> |
| 37 | <form action="{$smarty.server.REQUEST_URI}" method="post" id="changepass"> |
| 38 | {javascript name="jquery"} |
| 39 | <script type="text/javascript">//<![CDATA[ |
| 40 | {literal} |
| 41 | function getType(char) { |
| 42 | if (char >= 'a' && char <= 'z') { |
| 43 | return 1; |
| 44 | } else if (char >= 'A' && char <= 'Z') { |
| 45 | return 2; |
| 46 | } else if (char >= '0' && char <= '9') { |
| 47 | return 3; |
| 48 | } else { |
| 49 | return 4; |
| 50 | } |
| 51 | } |
| 52 | function checkPassword(box) { |
| 53 | var prev = 0; |
| 54 | var prop = 0; |
| 55 | var pass = box.value; |
| 56 | var types = Array(0, 0, 0, 0, 0); |
| 57 | for (i = 0 ; i < pass.length ; ++i) { |
| 58 | type = getType(pass.charAt(i)); |
| 59 | if (prev != 0 && prev != type) { |
| 60 | prop += 5; |
| 61 | } |
| 62 | if (i >= 5) { |
| 63 | prop += 5; |
| 64 | } |
| 65 | if (types[type] == 0) { |
| 66 | prop += 10; |
| 67 | } |
| 68 | types[type]++; |
| 69 | prev = type; |
| 70 | } |
| 71 | if (prop > 100) { |
| 72 | prop = 100; |
| 73 | } else if (prop < 0) { |
| 74 | prop = 0; |
| 75 | } |
| 76 | ok = (prop >= 60); |
| 77 | $("#passwords").width(prop + "%").css("background-color", ok ? "green" : "red"); |
| 78 | if (ok) { |
| 79 | $(":submit").removeAttr("disabled"); |
| 80 | } else { |
| 81 | $(":submit").attr("disabled", "disabled"); |
| 82 | } |
| 83 | } |
| 84 | {/literal} |
| 85 | //]]></script> |
| 86 | <table class="tinybicol" cellpadding="3" cellspacing="0" |
| 87 | summary="Formulaire de mot de passe"> |
| 88 | <tr> |
| 89 | <th colspan="2"> |
| 90 | Saisie du nouveau mot de passe |
| 91 | </th> |
| 92 | </tr> |
| 93 | <tr> |
| 94 | <td class="titre"> |
| 95 | Nouveau mot de passe : |
| 96 | </td> |
| 97 | <td> |
| 98 | <input type="password" size="10" maxlength="10" name="nouveau" onkeyup="checkPassword(this)" /> |
| 99 | </td> |
| 100 | </tr> |
| 101 | <tr> |
| 102 | <td class="titre"> |
| 103 | Retape-le une fois : |
| 104 | </td> |
| 105 | <td> |
| 106 | <input type="password" size="10" maxlength="10" name="nouveau2" /> |
| 107 | </td> |
| 108 | </tr> |
| 109 | <tr> |
| 110 | <td class="titre"> |
| 111 | Sécurité |
| 112 | </td> |
| 113 | <td> |
| 114 | <div style="border: 1px solid white; width: 250px; height: 7px; background-color: #444"> |
| 115 | <div id="passwords" style="height: 100%; background-color: red; width: 0px"></div> |
| 116 | </div> |
| 117 | </td> |
| 118 | </tr> |
| 119 | <tr> |
| 120 | <td colspan="2" class="center"> |
| 121 | <input type="submit" value="Changer" name="submitn" disabled="disabled" |
| 122 | onclick="EnCryptedResponse(); return false;" /> |
| 123 | </td> |
| 124 | </tr> |
| 125 | </table> |
| 126 | </form> |
| 127 | <form action="{$smarty.server.REQUEST_URI}" method="post" id="changepass2"> |
| 128 | <p> |
| 129 | {xsrf_token_field} |
| 130 | <input type="hidden" name="response2" value="" /> |
| 131 | </p> |
| 132 | </form> |
| 133 | |
| 134 | <p> |
| 135 | Note bien qu'il s'agit là du mot de passe te permettant de t'authentifier sur le site {#globals.core.sitename#} ; |
| 136 | le mot de passe te permettant d'utiliser le serveur <a href="./Xorg/SMTPSécurisé">SMTP</a> et <a href="Xorg/NNTPSécurisé">NNTP</a> |
| 137 | de {#globals.core.sitename#} (si tu as <a href="./password/smtp">activé l'accès SMTP et NNTP</a>) |
| 138 | est indépendant de celui-ci et tu peux le modifier <a href="./password/smtp">ici</a>. |
| 139 | </p> |
| 140 | |
| 141 | {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *} |