Changeset 7476

Show
Ignore:
Timestamp:
03/11/09 02:53:00 (4 years ago)
Author:
mickecarlsson
Message:

Localized module, added .pot file

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/branches/2.5/weakpasswords/functions.inc.php

    r7475 r7476  
    2727      if(sizeof($weak) > 0)  { 
    2828        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'])
    3030          $nt->add_security("weakpasswords", $details['name'], $details['deviceortrunk']." ".$details['name'].": ".$details['message'],$extended_text); 
    3131        } 
     
    6060    $match = "0123456789"; 
    6161    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); 
    6363    } 
    6464    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); 
    6666    } 
    6767    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); 
    6969    } 
    7070    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); 
    7272    } 
    7373  } 
  • modules/branches/2.5/weakpasswords/page.weakpasswords.php

    r7474 r7476  
    2525 
    2626  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>"; 
    2828?> 
    2929  <?php  
     
    3737  } 
    3838  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>"; 
    4040  } 
    4141  ?> 
  • modules/branches/2.5/weakpasswords/uninstall.php

    r7474 r7476  
    11<?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 
    213// Remove all weak password notifications 
    314$nt = notifications::create($db);