Changeset 7476
- Timestamp:
- 03/11/09 02:53:00 (4 years ago)
- Files:
-
- modules/branches/2.5/weakpasswords/functions.inc.php (modified) (2 diffs)
- modules/branches/2.5/weakpasswords/i18n (added)
- modules/branches/2.5/weakpasswords/i18n/sv_SE (added)
- modules/branches/2.5/weakpasswords/i18n/sv_SE/LC_MESSAGES (added)
- modules/branches/2.5/weakpasswords/i18n/sv_SE/LC_MESSAGES/weakpasswords.mo (added)
- modules/branches/2.5/weakpasswords/i18n/sv_SE/LC_MESSAGES/weakpasswords.po (added)
- modules/branches/2.5/weakpasswords/i18n/weakpasswords.pot (added)
- modules/branches/2.5/weakpasswords/page.weakpasswords.php (modified) (2 diffs)
- modules/branches/2.5/weakpasswords/uninstall.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
modules/branches/2.5/weakpasswords/functions.inc.php
r7475 r7476 27 27 if(sizeof($weak) > 0) { 28 28 foreach($weak as $details) { 29 $extended_text = "Warning: The use of SIP/IAX passwords that are weak can allow hackers to make brute force registrations and possibly make calls through your PBX. It is strongly recommended, you choose strong secrets.".$details['deviceortrunk']." ".$details['name']." has a weak secret of ".$details['secret'].": ".$details['message'];29 $extended_text = sprintf(_("Warning: The use of SIP/IAX passwords that are weak can allow hackers to make brute force registrations and possibly make calls through your PBX. It is strongly recommended, you choose strong secrets. %s %s has a weak secret of %s: %s"), $details['deviceortrunk'], $details['name'], $details['secret'], $details['message']); 30 30 $nt->add_security("weakpasswords", $details['name'], $details['deviceortrunk']." ".$details['name'].": ".$details['message'],$extended_text); 31 31 } … … 60 60 $match = "0123456789"; 61 61 if(strpos($match,$secret) || strpos($match,$reversed)) { 62 $weak[] = array("deviceortrunk" => $deviceortrunk, "name" => $name, "message" => "Secret has sequential digits", "secret" => $secret);62 $weak[] = array("deviceortrunk" => $deviceortrunk, "name" => $name, "message" => _("Secret has sequential digits"), "secret" => $secret); 63 63 } 64 64 else if($device == $secret) { 65 $weak[] = array("deviceortrunk" => $deviceortrunk, "name" => $name, "message" => "Secret same as device", "secret" => $secret);65 $weak[] = array("deviceortrunk" => $deviceortrunk, "name" => $name, "message" => _("Secret same as device"), "secret" => $secret); 66 66 } 67 67 else if(preg_match("/(.)\\1{3,}/",$secret,$regs)) { 68 $weak[] = array("deviceortrunk" => $deviceortrunk, "name" => $name, "message" => "Secret has consecutive digit ".$regs[1], "secret" => $secret);68 $weak[] = array("deviceortrunk" => $deviceortrunk, "name" => $name, "message" => _("Secret has consecutive digit ").$regs[1], "secret" => $secret); 69 69 } 70 70 else if(strlen($secret) < 6) { 71 $weak[] = array("deviceortrunk" => $deviceortrunk, "name" => $name, "message" => "Secret less than 6 digits", "secret" => $secret);71 $weak[] = array("deviceortrunk" => $deviceortrunk, "name" => $name, "message" => _("Secret less than 6 digits"), "secret" => $secret); 72 72 } 73 73 } modules/branches/2.5/weakpasswords/page.weakpasswords.php
r7474 r7476 25 25 26 26 echo "<table cellpadding=5><tr><td colspan=3><div class='content'><h2>"._("Weak Password Detection")."</h2></span></td></tr>\n"; 27 echo "<tr><td><b> Type</b></td><td><b>Name</b></td><td><b>Secret</b></td><td><b>Message</b></td></tr>";27 echo "<tr><td><b>"._("Type")."</b></td><td><b>"._("Name")."</b></td><td><b>"._("Secret")."</b></td><td><b>"._("Message")."</b></td></tr>"; 28 28 ?> 29 29 <?php … … 37 37 } 38 38 else { 39 echo "<tr><td colspan=3> No weak secrets detected on this system.</td></tr>";39 echo "<tr><td colspan=3>"._("No weak secrets detected on this system.")."</td></tr>"; 40 40 } 41 41 ?> modules/branches/2.5/weakpasswords/uninstall.php
r7474 r7476 1 1 <?php 2 //Copyright (C) 2009 Ethan Schreoder (ethan.schroeder@schmoozecom.com) 3 // 4 //This program is free software; you can redistribute it and/or 5 //modify it under the terms of version 2 of the GNU General Public 6 //License as published by the Free Software Foundation. 7 // 8 //This program is distributed in the hope that it will be useful, 9 //but WITHOUT ANY WARRANTY; without even the implied warranty of 10 //MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 //GNU General Public License for more details. 12 2 13 // Remove all weak password notifications 3 14 $nt = notifications::create($db);
