spell checking

This commit is contained in:
Roland Gruber 2020-03-02 15:20:18 +01:00
parent 041a8eb833
commit b7ab251f6c
16 changed files with 29 additions and 26 deletions

View File

@ -821,7 +821,7 @@ March 2020 7.1
- security: LAM checks the session id and client IP - security: LAM checks the session id and client IP
- fixed bugs: - fixed bugs:
-> Samba 3: hash values were wrong in some rare cases (1440021) -> Samba 3: hash values were wrong in some rare cases (1440021)
-> Samba 3: readded time zone selection for logon hours (1407761) -> Samba 3: re-added time zone selection for logon hours (1407761)
-> Unix: call of unknown function (1450464) -> Unix: call of unknown function (1450464)

3
lam/codespell.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/bash
~/.local/bin/codespell --skip '*3rdParty*,*/ckeditor/*,*/po/*,*/locale/*,tmp,sess,config,graphics,*/style/images/*,*/style/*.gif,*/style/*.png,*/docs/manual-onePage/*,*/docs/manual-sources/images/*,*/templates/lib/*jquery*,*~,*/docs/phpdoc/*,*/docs/manual/*,*/docs/devel/images/*,*/docs/manual-pdf/*,*.sh' --ignore-words-list 'tim'

View File

@ -1346,7 +1346,7 @@ function encodeMailAddress($address) {
} }
/** /**
* Returns a base64 encoded string of the given values in a fomat that is used in emails. * Returns a base64 encoded string of the given values in a format that is used in emails.
* *
* @param String $value value to encode * @param String $value value to encode
* @return String base64 encoded value * @return String base64 encoded value

View File

@ -7,7 +7,7 @@ use LAM\PDF\PDFImage;
/* /*
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
Copyright (C) 2003 - 2018 Roland Gruber Copyright (C) 2003 - 2020 Roland Gruber
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
@ -880,7 +880,7 @@ abstract class baseModule {
* *
* Calling this method does not require the existence of an enclosing {@link accountContainer}.<br> * Calling this method does not require the existence of an enclosing {@link accountContainer}.<br>
* <br> * <br>
* This funtion returns an array which contains subarrays which represent an upload column. * This function returns an array which contains subarrays which represent an upload column.
* <b>Syntax of column arrays:</b> * <b>Syntax of column arrays:</b>
* <br> * <br>
* <br> array( * <br> array(

View File

@ -264,7 +264,7 @@ function deleteConfigProfile($name) {
/** /**
* Returns the version number of this LAM installation. * Returns the version number of this LAM installation.
* Format: <major version>.<minor version>.<patch level> * Format: <major version>.<minor version>.<patch level>
* <br> Major/minor version are always numbers, patch level may contain letters for inofficial releases only (e.g. 0.5.alpha1). * <br> Major/minor version are always numbers, patch level may contain letters for unofficial releases only (e.g. 0.5.alpha1).
* *
* @return string version number * @return string version number
*/ */

View File

@ -40,7 +40,7 @@ $Id$
*/ */
class smbHash { class smbHash {
# Contants used in lanlam hash calculations # Constants used in lanlam hash calculations
# Ported from SAMBA/source/libsmb/smbdes.c:perm1[56] # Ported from SAMBA/source/libsmb/smbdes.c:perm1[56]
private $perm1 = array(57, 49, 41, 33, 25, 17, 9, private $perm1 = array(57, 49, 41, 33, 25, 17, 9,
1, 58, 50, 42, 34, 26, 18, 1, 58, 50, 42, 34, 26, 18,

View File

@ -782,7 +782,7 @@ class htmlInputField extends htmlElement {
* Enables autocompletion for this input field. * Enables autocompletion for this input field.
* *
* @param array $values list of values to suggest * @param array $values list of values to suggest
* @param int $minLength autocompletion starts after this number of caracters entered (default 1; 0 means immediate start) * @param int $minLength autocompletion starts after this number of characters entered (default 1; 0 means immediate start)
* @param boolean $multiValue allow multiple autocompletion values in the same fields (default: false) * @param boolean $multiValue allow multiple autocompletion values in the same fields (default: false)
* @param String $multiSeparator separator expression if multiple autocompletion values are allowed (default ",\s*") * @param String $multiSeparator separator expression if multiple autocompletion values are allowed (default ",\s*")
* @param String $multiSeparator separator for two values (default ", ") * @param String $multiSeparator separator for two values (default ", ")
@ -1424,7 +1424,7 @@ class htmlSelect extends htmlElement {
} }
/** /**
* Specifies if the elemets should be sorted (default: sort). * Specifies if the elements should be sorted (default: sort).
* *
* @param boolean $sortElements sort elements * @param boolean $sortElements sort elements
*/ */
@ -3465,7 +3465,7 @@ class htmlContentLink extends htmlLink {
* *
* @param htmlElement $content content to link * @param htmlElement $content content to link
* @param String $target link target * @param String $target link target
* @param boolean $highlightOnHover higlight content on hover * @param boolean $highlightOnHover highlight content on hover
*/ */
function __construct($content, $target) { function __construct($content, $target) {
$this->content = $content; $this->content = $content;

View File

@ -4,7 +4,7 @@ use \LAM\TYPES\TypeManager;
/* /*
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
Copyright (C) 2003 - 2019 Roland Gruber Copyright (C) 2003 - 2020 Roland Gruber
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
@ -223,7 +223,7 @@ function getModulesDependencies($scope) {
* *
* @param array $selected selected module names * @param array $selected selected module names
* @param array $deps module dependencies * @param array $deps module dependencies
* @return mixed false if no misssing dependency was found, * @return mixed false if no missing dependency was found,
* otherwise an array of array(selected module, depending module) if missing dependencies were found * otherwise an array of array(selected module, depending module) if missing dependencies were found
*/ */
function check_module_depends($selected, $deps) { function check_module_depends($selected, $deps) {
@ -850,7 +850,7 @@ class accountContainer {
} }
/** /**
* Returns the accout type of this object (e.g. user, group, host). * Returns the account type of this object (e.g. user, group, host).
* *
* @return ConfiguredType account type * @return ConfiguredType account type
*/ */
@ -1211,7 +1211,7 @@ class accountContainer {
$return['messages'] .= StatusMessage('ERROR', _('Passwords are different!'), '', array(), true); $return['messages'] .= StatusMessage('ERROR', _('Passwords are different!'), '', array(), true);
$return['errorsOccured'] = 'true'; $return['errorsOccured'] = 'true';
} }
// check passsword stregth // check passsword strength
$pwdPolicyResult = checkPasswordStrength($password1, null, null); $pwdPolicyResult = checkPasswordStrength($password1, null, null);
if ($pwdPolicyResult !== true) { if ($pwdPolicyResult !== true) {
$return['messages'] .= StatusMessage('ERROR', $pwdPolicyResult, '', array(), true); $return['messages'] .= StatusMessage('ERROR', $pwdPolicyResult, '', array(), true);

View File

@ -1086,7 +1086,7 @@ class posixAccount extends baseModule implements passwordService {
} }
} }
$this->attributes['uid'][0] = trim($_POST['uid']); $this->attributes['uid'][0] = trim($_POST['uid']);
// Check if UID is valid. If none value was entered, the next useable value will be inserted // Check if UID is valid. If none value was entered, the next usable value will be inserted
// load min and may uidNumber // load min and may uidNumber
if ($this->get_scope()=='user') { if ($this->get_scope()=='user') {
$minID = intval($this->moduleSettings['posixAccount_' . $typeId . '_minUID'][0]); $minID = intval($this->moduleSettings['posixAccount_' . $typeId . '_minUID'][0]);

View File

@ -6,7 +6,7 @@ use LAM\TYPES\ConfiguredType;
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
Copyright (C) 2003 - 2006 Tilo Lutz Copyright (C) 2003 - 2006 Tilo Lutz
2007 - 2019 Roland Gruber 2007 - 2020 Roland Gruber
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
@ -822,7 +822,7 @@ class posixGroup extends baseModule implements passwordService {
if (isset($_POST['changegids'])) $this->changegids=true; if (isset($_POST['changegids'])) $this->changegids=true;
else $this->changegids=false; else $this->changegids=false;
if (!isset($this->attributes['gidNumber'][0]) || ($this->attributes['gidNumber'][0] != $_POST['gidNumber'])) { if (!isset($this->attributes['gidNumber'][0]) || ($this->attributes['gidNumber'][0] != $_POST['gidNumber'])) {
// Check if GID is valid. If none value was entered, the next useable value will be inserted // Check if GID is valid. If none value was entered, the next usable value will be inserted
// load min and max GID number // load min and max GID number
$minID = intval($this->moduleSettings['posixGroup_' . $typeId . '_minGID'][0]); $minID = intval($this->moduleSettings['posixGroup_' . $typeId . '_minGID'][0]);
$maxID = intval($this->moduleSettings['posixGroup_' . $typeId . '_maxGID'][0]); $maxID = intval($this->moduleSettings['posixGroup_' . $typeId . '_maxGID'][0]);

View File

@ -107,7 +107,7 @@ function createPdf($structure, $accounts, $pdfKeys, $account_type, $font, $retur
// Get PDF entries for the current account // Get PDF entries for the current account
$entries = $account->get_pdfEntries($pdfKeys, $account_type->getId()); $entries = $account->get_pdfEntries($pdfKeys, $account_type->getId());
// Now create the PDF file acording to the structure with the submitted values // Now create the PDF file according to the structure with the submitted values
foreach ($structure->getSections() as $section) { foreach ($structure->getSections() as $section) {
if ($section instanceof PDFTextSection) { if ($section instanceof PDFTextSection) {
$pdf->setFont($font, "", LAMPDF_FONT_SIZE); $pdf->setFont($font, "", LAMPDF_FONT_SIZE);

View File

@ -1354,7 +1354,7 @@ function _get_schema_dn($dn, $debug=false )
function _get_raw_schema($schema_to_fetch, $dn='' ) function _get_raw_schema($schema_to_fetch, $dn='' )
{ {
// Swith to true to enable verbose output of schema fetching progress // Switch to true to enable verbose output of schema fetching progress
$debug = false; $debug = false;
$ds = $_SESSION['ldap']->server(); $ds = $_SESSION['ldap']->server();

View File

@ -2,7 +2,7 @@
/* /*
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
Copyright (C) 2006 - 2019 Roland Gruber Copyright (C) 2006 - 2020 Roland Gruber
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
@ -53,7 +53,7 @@ function lam_start_session() {
/** /**
* Starts a session and checks the environment. * Starts a session and checks the environment.
* The script is stopped if one of the checks fail (timeout redirection may be overriden). * The script is stopped if one of the checks fail (timeout redirection may be overridden).
* *
* @param boolean $redirectToLogin redirect user to login page (default: true) * @param boolean $redirectToLogin redirect user to login page (default: true)
* @param boolean $initSecureData init verification data like session ID and client IP (default: false) * @param boolean $initSecureData init verification data like session ID and client IP (default: false)

View File

@ -3,7 +3,7 @@
$Id$ $Id$
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
Copyright (C) 2009 - 2011 Roland Gruber Copyright (C) 2009 - 2020 Roland Gruber
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
@ -58,7 +58,7 @@ function getTools() {
/** /**
* Represents a tool. * Represents a tool.
* LAM will scan lib/tools/*.inc for classes which implement this interface. This alows to * LAM will scan lib/tools/*.inc for classes which implement this interface. This allows to
* dynamically plugin additional tools. There will be an entry on the tools page inside LAM * dynamically plugin additional tools. There will be an entry on the tools page inside LAM
* for each found class (if it matches the security level). * for each found class (if it matches the security level).
* A LAMTool only specifies name, description and location of a tool. The tool functionality * A LAMTool only specifies name, description and location of a tool. The tool functionality

View File

@ -6,7 +6,7 @@ use accountContainer;
$Id$ $Id$
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
Copyright (C) 2016 - 2018 Roland Gruber Copyright (C) 2016 - 2020 Roland Gruber
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
@ -153,7 +153,7 @@ class Uploader {
if (!$success) { if (!$success) {
$errorMessage = array( $errorMessage = array(
"ERROR", "ERROR",
_("LAM was unable to create account %s! An LDAP error occured."), _("LAM was unable to create account %s! An LDAP error occurred."),
getDefaultLDAPErrorString($_SESSION['ldap']->server()), getDefaultLDAPErrorString($_SESSION['ldap']->server()),
array($position)); array($position));
$_SESSION['mass_errors'][] = $errorMessage; $_SESSION['mass_errors'][] = $errorMessage;

View File

@ -21,7 +21,7 @@ use \moduleCache;
/* /*
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
Copyright (C) 2004 - 2019 Roland Gruber Copyright (C) 2004 - 2020 Roland Gruber
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
@ -251,7 +251,7 @@ echo '</div>';
include __DIR__ . '/../../lib/adminFooter.inc'; include __DIR__ . '/../../lib/adminFooter.inc';
/** /**
* Displays the acount type specific main page of the upload. * Displays the account type specific main page of the upload.
* *
* @param \LAM\TYPES\ConfiguredType $type account type * @param \LAM\TYPES\ConfiguredType $type account type
* @param array $selectedModules list of selected account modules * @param array $selectedModules list of selected account modules