package.xml0000664000175000017500000011454412653661601011316 0ustar janjan Horde_Auth pear.horde.org Auth Horde Authentication API The Horde_Auth package provides a common interface into the various backends for the Horde authentication system. Chuck Hagenbuch chuck chuck@horde.org yes Jan Schneider jan jan@horde.org yes Michael Slusarz slusarz slusarz@horde.org yes 2016-02-01 2.1.11 2.1.0 stable stable LGPL-2.1 * [jan] Mark PHP 7 as supported. 5.3.0 8.0.0alpha1 8.0.0alpha1 1.7.0 Horde_Exception pear.horde.org 2.0.0 3.0.0alpha1 3.0.0alpha1 Horde_Translation pear.horde.org 2.2.0 3.0.0alpha1 3.0.0alpha1 Horde_Util pear.horde.org 2.0.0 3.0.0alpha1 3.0.0alpha1 hash Horde_Db pear.horde.org 2.0.0 3.0.0alpha1 3.0.0alpha1 Horde_History pear.horde.org 2.0.0 3.0.0alpha1 3.0.0alpha1 Horde_Lock pear.horde.org 2.0.0 3.0.0alpha1 3.0.0alpha1 Horde_Imap_Client pear.horde.org 2.0.0 3.0.0alpha1 3.0.0alpha1 Horde_Kolab_Session pear.horde.org 2.0.0 3.0.0alpha1 3.0.0alpha1 Horde_Ldap pear.horde.org 2.0.0 3.0.0alpha1 3.0.0alpha1 Horde_Imsp pear.horde.org 2.0.0 3.0.0alpha1 3.0.0alpha1 Horde_Http pear.horde.org 2.0.0 3.0.0alpha1 3.0.0alpha1 Horde_Test pear.horde.org 2.1.0 3.0.0alpha1 3.0.0alpha1 pam pecl.php.net pam sasl pecl.php.net sasl ctype ftp 2008-09-16 0.1.0 0.1.0 beta beta LGPL-2.1 * Fixed error handling when removing user data. * Retrieve password where necessary for salt calculations in the custom SQL driver (Bug #3739). * Added a query for checking existance of a user to the custom SQL driver (Request #5151). * Completed Cyrus virtual domain support in the cyrsql driver. * Fixed handling of UID logins in the Kolab driver (Bugs #1317, #4662). * Fixed case handling in the LDAP driver (Bug #2435). * Rewrote PAM driver to use PAM extension from PECL. * Fixed the PAM driver authentication so that it works with both pam and pam_auth extensions (Bug #6860). * Ensured that the LDAP driver always uses the configured filter. * Renamed Auth_sasl to Auth_peclsasl (Bug #4547). * Allow signup hooks to override the user_name and password fields (Request #2904). * Created an SQL driver for signups and allowing backends other than DataTree (Request #7161). * Added smbclient driver as an alternative to the smb driver which requires a PHP extension. * Fix handling of SSHA and SMD5 salts (ulrich-horde@topfen.net, Bug #2863). * Added readSessionData() function to get Horde authentication data from session strings. * Allow drivers to include their own isAdmin() implementations (Request #5521). * Add Active Directory extension of LDAP driver (Request #3769). * Hide the cyrus account in cyrsql driver (vilius@lnk.lt, Request #5626). * Bring the passwd driver into compliance with the Auth API. * Remove dependency on the mhash extension for some encryption types. * Add authentication against a remote HTTP Authentication endpoint (duck@obala.net). * CSRF token protections for logout links. * Call the postauthenticate hook in Horde_Auth::setAuth() instead of authenticate(). * Modified the Kolab driver to use the new Kolab_Server package. * Improved handling of multiple IMAP server setups in the Kolab driver. 2008-10-29 0.1.1 0.1.0 beta beta LGPL-2.1 * Imap driver now uses Horde_Imap_Client library. * Add signup drivers to package.xml (Bug #7345). * Fix the "overwriting realm info from application auth drivers" (Bug #6749) * Switched Kolab auth handling from IMAP to LDAP by using Kolab_Server. * Added "add user" capability to the Kolab driver. * Adapted the Kolab auth driver to the changes in Kolab_Server. 1.0.0alpha1 1.0.0 alpha alpha 2011-03-08 LGPL-2.1 * First alpha release for Horde 4. * Remove dependency on horde/Core. * Remove all non-authentication backend related code. * Removed Krb5 driver. * Moved signup code to horde/Core. * Split Horde_Auth into Horde_Auth and Horde_Auth_Base components. 1.0.0beta1 1.0.0 beta beta 2011-03-16 LGPL-2.1 * First beta release for Horde 4. 1.0.0RC1 1.0.0 beta beta 2011-03-22 LGPL-2.1 * First release candidate for Horde 4. 1.0.0RC2 1.0.0 beta beta 2011-03-29 LGPL-2.1 * Second release candidate for Horde 4. * Remove Cyrus driver. * Remove support for pam_auth (Ticket #6860). 1.0.0 1.0.0 stable stable 2011-04-06 LGPL-2.1 * First stable release for Horde 4. * [jan] Fix Cyrsql driver (Vilius Sumskas <vilius@lnk.lt>, Bug #9781). * [jan] Add SHA-256 hashing and add SHA as alias for SHA1. 1.0.1 1.0.0 stable stable 2011-04-20 LGPL-2.1 * [mms] Fix default userhierarchy for Cyrsql driver (Bug #9895). * [cjh] Add crypt-sha256 and crypt-sha512 password hashes (patrickdk@patrickdk.com, Request #6991). * [mms] Fix addUser() in Customsql driver (Bug #9832). 1.0.2 1.0.0 stable stable 2011-05-03 LGPL-2.1 * [jan] Fix listing users in Customsql driver (Bug #9963). 1.0.3 1.0.0 stable stable 2011-05-18 LGPL-2.1 * [mms] Cyrsql driver doesn't support resetting passwords currently (Bug #10060). 1.0.4 1.0.0 stable stable 2011-06-08 LGPL-2.1 * [jan] SECURITY: Fix propagating failed login in composite driver (Bug #10211). 1.1.0 1.1.0 stable stable 2011-07-05 LGPL-2.1 * [rla] Add sort parameter to listUsers() method. * [mms] Fix addUser() for Cyrsql driver (vilius@lnk.lt, Bug #10239). 1.2.0 1.2.0 stable stable 2011-08-31 LGPL-2.1 * [rla] Add bad login blocking and account locking to the base driver. * [rla] Fix SQL driver when using soft_expiration and hard_expiration features. * [rla] No longer enforce lowercase fieldnames. 1.3.0 1.3.0 stable stable 2011-09-20 LGPL-2.1 * [jan] Dynamically disable capabilities of Customsql authentication driver if queries are empty (Michael Gröne, Request #10510). * [jan] Fix updating users in LDAP while using preauthenticate hooks. * [jan] Add support for resetting passwords to LDAP driver. 1.4.0 1.4.0 stable stable 2011-09-28 LGPL-2.1 * [jan] Add checkPasswordPolicy() and checkPasswordSimilarity() methods. 1.4.1 1.4.0 stable stable 2011-10-03 LGPL-2.1 * [jan] Add missing locale directory (Bug #10589). 1.4.2 1.4.0 stable stable 2011-10-04 LGPL-2.1 * [jan] Fix detecting locale directory from PEAR installation (Bug #10589). 1.4.3 1.4.0 stable stable 2011-10-18 LGPL-2.1 * [jan] Catch exceptions from imap library (Bug #10272). 1.4.4 1.4.0 stable stable 2011-11-08 LGPL-2.1 * [jan] Allow to run unit tests from installed package. 1.4.5 1.4.0 stable stable 2011-11-22 LGPL-2.1 * [jan] Add Estonian translation. 1.4.6 1.4.0 stable stable 2011-12-06 LGPL-2.1 * [jan] Add Japanese translation (Hiromi Kimura <hiromi@tac.tsukuba.ac.jp>). 1.4.7 1.4.0 stable stable 2011-12-13 LGPL-2.1 * [jan] Add Latvian translation (Jānis Eisaks <jancs@dv.lv>). 1.4.8 1.4.0 stable stable 2012-01-31 LGPL-2.1 * [jan] Add optimized exists() implementation to LDAP driver (Marco Ferrante <marco@csita.unige.it>, Request #10944). * [jan] Add Spanish translation (Manuel P. Ayala <mayala@unex.es>). 1.4.9 1.4.0 stable stable 2012-03-20 LGPL-2.1 * [jan] Add Finnish translation (Leena Heino <liinu@uta.fi>). 1.4.10 1.4.0 stable stable 2012-03-20 LGPL-2.1 * [mms] Fix Horde_Auth_Passwd#updateUser(). 2012-07-05 2.0.0alpha1 2.0.0alpha1 alpha alpha LGPL-2.1 * First alpha release for Horde 5. * [mms] Removed charset parameter for Imap and Cyrsql drivers. 2.0.0beta1 2.0.0beta1 beta beta 2012-07-19 LGPL-2.1 * First beta release for Horde 5. * [rla] Use constant for permanent lock and provide more verbose feedback (Request #11254). 2.0.0beta2 2.0.0beta1 beta beta 2012-10-12 LGPL-2.1 * [jan] Fix setting IMAP ACLs in IMAP and Cyrsql drivers. * [mms] Fix user management in Passwd driver. * [mms] Fix setting soft expiration in SQL driver. 2.0.0 2.0.0 stable stable 2012-10-30 LGPL-2.1 * First stable release for Horde 5. 2.0.1 2.0.0 stable stable 2012-11-19 LGPL-2.1 * [mms] Use new Horde_Test layout. 2.0.2 2.0.0 stable stable 2013-01-09 LGPL-2.1 * [jan] Add Basque translation (Ibon Igartua <ibon.igartua@ehu.es>). * [jan] Fix updating users in LDAP driver (Bug #11791). 2.0.3 2.0.0 stable stable 2013-01-29 LGPL-2.1 * [jan] Add French translation (Paul De Vlieger <paul.de_vlieger@moniut.univ-bpclermont.fr>). * [jan] Fix argument reading in Samba drivers (Bug #11926). * [mms] Remove call-time pass-by-reference, which was causing PAM authentication driver to fail in PHP 5.4+ (Bug #10965). 2.0.4 2.0.0 stable stable 2013-03-05 LGPL-2.1 * [jan] Improve documentation. 2.0.5 2.0.0 stable stable 2013-07-16 LGPL-2.1 * [jan] Add password policy for minimum number of non-alphabetic characters (Friedrich Haubensak <hsk@fli-leibniz.de>, Request #12243). * [jan] Fix resetting passwords with LDAP driver (Bug #12317). * [mms] Fix authentication with the Http auth driver. 2.0.6 2.0.0 stable stable 2013-07-16 LGPL-2.1 * [mms] Fix adding/deleting users via IMAP administration (Bug #12426). 2.1.0 2.1.0 stable stable 2013-09-02 LGPL-2.1 * [mjr] Add X509 authentication driver. 2.1.1 2.1.0 stable stable 2013-10-15 LGPL-2.1 * [mms] Password strength testing is now case-insensitive (delrio@mie.utoronto.ca, Request #12708). 2.1.2 2.1.0 stable stable 2014-03-03 LGPL-2.1 * [jan] Add MySQL password hashing (Request #12962). * [rla] Add joomla encrypted password format (Request #12889). * [mms] Fix parsing salted SHA256 entries (Adam James <adam.james@transitiv.co.uk>). 2.1.3 2.1.0 stable stable 2014-04-03 LGPL-2.1 * [jan] Add Danish translation (Erling Preben Hansen <erling@eph.dk>). 2.1.4 2.1.0 stable stable 2014-05-21 LGPL-2.1 * [jan] Add Hungarian translation (Andras Galos <galosa@netinform.hu>). 2.1.5 2.1.0 stable stable 2014-06-17 LGPL-2.1 * [jan] Add Polish translation (Maciej Uhlig <maciej.uhlig@us.edu.pl>). 2.1.6 2.1.0 stable stable 2015-01-08 LGPL-2.1 * [jan] Support loading translations from Composer-installed package. * [jan] Improve PSR-2 compatibility. 2.1.7 2.1.0 stable stable 2015-04-13 LGPL-2.1 * [jan] Improve salt generation for Blowfish hashes. 2.1.8 2.1.0 stable stable 2015-04-28 LGPL-2.1 * [jan] Fix issues with certain locales like Turkish. 2.1.9 2.1.0 stable stable 2015-06-29 LGPL-2.1 * [mjr] Ensure we rebind as configured user after testing auth user credentials. 2.1.10 2.1.0 stable stable 2015-07-06 LGPL-2.1 * [jan] SECURITY: Don't allow to login to LDAP with an emtpy password. 2.1.11 2.1.0 stable stable 2016-02-01 LGPL-2.1 * [jan] Mark PHP 7 as supported. Horde_Auth-2.1.11/doc/Horde/Auth/COPYING0000664000175000017500000005764612653661601015514 0ustar janjan GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Horde_Auth-2.1.11/lib/Horde/Auth/Http/Remote.php0000664000175000017500000000354712653661601017334 0ustar janjan * @category Horde * @license http://www.horde.org/licenses/lgpl21 LGPL-2.1 * @package Auth */ /** * The Horde_Auth_Http_Remote class authenticates users against a remote * HTTP-Auth endpoint. * * @author Duck * @category Horde * @license http://www.horde.org/licenses/lgpl21 LGPL-2.1 * @package Auth */ class Horde_Auth_Http_Remote extends Horde_Auth_Base { /** * Constructor. * * @param array $params Configuration parameters: *
     * 'client' - (Horde_Http_Client) [REQUIRED] TODO
     * 'url' - (string) [REQUIRED] TODO
     * 
* * @throws InvalidArgumentException */ public function __construct(array $params = array()) { if (!isset($params['url']) || !isset($params['client'])) { throw new InvalidArgumentException(); } parent::__construct($params); } /** * Find out if a set of login credentials are valid. * * @param string $userId The userId to check. * @param array $credentials An array of login credentials. * * @throws Horde_Auth_Exception */ protected function _authenticate($userId, $credentials) { $this->_params['client']->request->username = $userId; $this->_params['client']->request->password = $credentials['password']; $this->_params['client']->request->authenticationScheme = Horde_Http::AUTH_BASIC; $response = $this->_params['client']->get($this->_params['url']); if ($response->code != 200) { throw new Horde_Auth_Exception('', Horde_Auth::REASON_BADLOGIN); } } } Horde_Auth-2.1.11/lib/Horde/Auth/Auto.php0000664000175000017500000000523212653661601016063 0ustar janjan * @category Horde * @license http://www.horde.org/licenses/lgpl21 LGPL-2.1 * @package Auth */ /** * The Horde_Auth_Auto class transparently logs users in to Horde using ONE * username, either defined in the config or defaulting to 'horde_user'. * * This is only for use in testing or behind a firewall; it should NOT be used * on a public, production machine. * * @author Chuck Hagenbuch * @category Horde * @license http://www.horde.org/licenses/lgpl21 LGPL-2.1 * @package Auth */ class Horde_Auth_Auto extends Horde_Auth_Base { /** * An array of capabilities, so that the driver can report which * operations it supports and which it doesn't. * * @var array */ protected $_capabilities = array( 'transparent' => true ); /** * Constructor. * * @param array $params Optional parameters: *
     * 'password' - (string) The password to record in the user's credentials.
     *              DEFAULT: none
     * 'requestuser' - (boolean) If true, allow username to be passed by GET,
     *                 POST or cookie.
     *                 DEFAULT: No
     * 'username' - (string) The username to authenticate everyone as.
     *              DEFAULT: 'horde_user'
     * 
*/ public function __construct(array $params = array()) { $params = array_merge(array( 'password' => '', 'requestuser' => false, 'username' => 'horde_user' ), $params); parent::__construct($params); } /** * Not implemented. * * @param string $userId The userID to check. * @param array $credentials An array of login credentials. * * @throws Horde_Auth_Exception */ protected function _authenticate($userId, $credentials) { throw new Horde_Auth_Exception('Unsupported.'); } /** * Automatic authentication. * * @return boolean Whether or not the client is allowed. */ public function transparent() { $this->_credentials['userId'] = (!empty($this->_params['requestuser']) && isset($_REQUEST['username'])) ? $_REQUEST['username'] : $this->_params['username']; $this->_credentials['credentials'] = array( 'password' => isset($this->_params['password']) ? $this->_params['password'] : null ); return true; } } Horde_Auth-2.1.11/lib/Horde/Auth/Base.php0000664000175000017500000004237112653661601016032 0ustar janjan * @author Michael Slusarz * @category Horde * @license http://www.horde.org/licenses/lgpl21 LGPL-2.1 * @package Auth */ /** * The Horde_Auth_Base class provides a common abstracted interface to creating * various authentication backends. * * @author Chuck Hagenbuch * @author Michael Slusarz * @category Horde * @license http://www.horde.org/licenses/lgpl21 LGPL-2.1 * @package Auth */ abstract class Horde_Auth_Base { /** * An array of capabilities, so that the driver can report which * operations it supports and which it doesn't. * * @var array */ protected $_capabilities = array( 'add' => false, 'authenticate' => true, 'groups' => false, 'list' => false, 'resetpassword' => false, 'remove' => false, 'transparent' => false, 'update' => false, 'badlogincount' => false, 'lock' => false, ); /** * Hash containing parameters needed for the drivers. * * @var array */ protected $_params = array(); /** * The credentials currently being authenticated. * * @var array */ protected $_credentials = array( 'change' => false, 'credentials' => array(), 'expire' => null, 'userId' => '' ); /** * Logger object. * * @var Horde_Log_Logger */ protected $_logger; /** * History object. * * @var Horde_History */ protected $_history_api; /** * Lock object. * * @var Horde_Lock */ protected $_lock_api; /** * Authentication error information. * * @var array */ protected $_error; /** * Constructor. * * @param array $params Optional parameters: * - default_user: (string) The default user. * - logger: (Horde_Log_Logger, optional) A logger object. * - lock_api: (Horde_Lock, optional) A locking object. * - history_api: (Horde_History, optional) A history object. * - login_block_count: (integer, optional) How many failed logins * trigger autoblocking? 0 disables the feature. * - login_block_time: (integer, options) How many minutes should * autoblocking last? 0 means no expiration. */ public function __construct(array $params = array()) { if (isset($params['logger'])) { $this->_logger = $params['logger']; unset($params['logger']); } if (isset($params['lock_api'])) { $this->_lock_api = $params['lock_api']; $this->_capabilities['lock'] = true; unset($params['lock_api']); } if (isset($params['history_api'])) { $this->_history_api = $params['history_api']; $this->_capabilities['badlogincount'] = true; unset($params['history_api']); } $params = array_merge(array( 'default_user' => '' ), $params); $this->_params = $params; } /** * Finds out if a set of login credentials are valid, and if requested, * mark the user as logged in in the current session. * * @param string $userId The userId to check. * @param array $credentials The credentials to check. * @param boolean $login Whether to log the user in. If false, we'll * only test the credentials and won't modify * the current session. Defaults to true. * * @return boolean Whether or not the credentials are valid. */ public function authenticate($userId, $credentials, $login = true) { $userId = trim($userId); try { $this->_credentials['userId'] = $userId; if (($this->hasCapability('lock')) && $this->isLocked($userId)) { $details = $this->isLocked($userId, true); if ($details['lock_timeout'] == Horde_Lock::PERMANENT) { $message = Horde_Auth_Translation::t("Your account has been permanently locked"); } else { $message = sprintf(Horde_Auth_Translation::t("Your account has been locked for %d minutes"), ceil(($details['lock_timeout'] - time()) / 60)); } throw new Horde_Auth_Exception($message, Horde_Auth::REASON_LOCKED); } $this->_authenticate($userId, $credentials); $this->setCredential('userId', $this->_credentials['userId']); $this->setCredential('credentials', $credentials); if ($this->hasCapability('badlogincount')) { $this->_resetBadLogins($userId); } return true; } catch (Horde_Auth_Exception $e) { if (($code = $e->getCode()) && $code != Horde_Auth::REASON_MESSAGE) { if (($code == Horde_Auth::REASON_BADLOGIN) && $this->hasCapability('badlogincount')) { $this->_badLogin($userId); } $this->setError($code, $e->getMessage()); } else { $this->setError(Horde_Auth::REASON_MESSAGE, $e->getMessage()); } return false; } } /** * Basic sort implementation. * * If the backend has listUsers and doesn't have a native sorting option, * fall back to this method. * * @param array $users An array of usernames. * @param boolean $sort Whether to sort or not. * * @return array the users, sorted or not * */ protected function _sort($users, $sort) { if ($sort) { sort($users); } return $users; } /** * Authentication stub. * * On failure, Horde_Auth_Exception should pass a message string (if any) * in the message field, and the Horde_Auth::REASON_* constant in the code * field (defaults to Horde_Auth::REASON_MESSAGE). * * @param string $userId The userID to check. * @param array $credentials An array of login credentials. * * @throws Horde_Auth_Exception */ abstract protected function _authenticate($userId, $credentials); /** * Checks for triggers that may invalidate the current auth. * These triggers are independent of the credentials. * * @return boolean True if the results of authenticate() are still valid. */ public function validateAuth() { return true; } /** * Adds a set of authentication credentials. * * @param string $userId The userId to add. * @param array $credentials The credentials to use. * * @throws Horde_Auth_Exception */ public function addUser($userId, $credentials) { throw new Horde_Auth_Exception('Unsupported.'); } /** * Locks a user indefinitely or for a specified time. * * @param string $userId The user to lock. * @param integer $time The duration in minutes, 0 = permanent. * * @throws Horde_Auth_Exception */ public function lockUser($userId, $time = 0) { if (!$this->_lock_api) { throw new Horde_Auth_Exception('Unsupported.'); } if ($time == 0) { $time = Horde_Lock::PERMANENT; } else { $time *= 60; } try { if ($this->_lock_api->setLock($userId, 'horde_auth', 'login:' . $userId, $time, Horde_Lock::TYPE_EXCLUSIVE)) { return; } } catch (Horde_Lock_Exception $e) { throw new Horde_Auth_Exception($e); } throw new Horde_Auth_Exception('User is already locked', Horde_Auth::REASON_LOCKED); } /** * Unlocks a user and optionally resets the bad login count. * * @param string $userId The user to unlock. * @param boolean $resetBadLogins Reset bad login counter? * * @throws Horde_Auth_Exception */ public function unlockUser($userId, $resetBadLogins = false) { if (!$this->_lock_api) { throw new Horde_Auth_Exception('Unsupported.'); } try { $locks = $this->_lock_api->getLocks( 'horde_auth', 'login:' . $userId, Horde_Lock::TYPE_EXCLUSIVE); $lock_id = key($locks); if ($lock_id) { $this->_lock_api->clearLock($lock_id); } if ($resetBadLogins) { $this->_resetBadLogins($userId); } } catch (Horde_Lock_Exception $e) { throw new Horde_Auth_Exception($e); } } /** * Returns whether a user is currently locked. * * @param string $userId The user to check. * @param boolean $show_details Return timeout too? * * @return boolean|array If $show_details is a true, an array with * 'locked' and 'lock_timeout' values. Whether the * user is locked, otherwise. * @throws Horde_Auth_Exception */ public function isLocked($userId, $show_details = false) { if (!$this->_lock_api) { throw new Horde_Auth_Exception('Unsupported.'); } try { $locks = $this->_lock_api->getLocks( 'horde_auth', 'login:' . $userId, Horde_Lock::TYPE_EXCLUSIVE); } catch (Horde_Lock_Exception $e) { throw new Horde_Auth_Exception($e); } if ($show_details) { $lock_id = key($locks); return empty($lock_id) ? array('locked' => false, 'lock_timeout' => 0) : array('locked' => true, 'lock_timeout' => $locks[$lock_id]['lock_expiry_timestamp']); } return !empty($locks); } /** * Handles a bad login. * * @param string $userId The user with a bad login. * * @throws Horde_Auth_Exception */ protected function _badLogin($userId) { if (!$this->_history_api) { throw new Horde_Auth_Exception('Unsupported.'); } $history_identifier = $userId . '@logins.failed'; try { $this->_history_api->log( $history_identifier, array('action' => 'login_failed', 'who' => $userId)); $history_log = $this->_history_api->getHistory($history_identifier); if ($this->_params['login_block_count'] > 0 && $this->_params['login_block_count'] <= $history_log->count() && $this->hasCapability('lock')) { $this->lockUser($userId, $this->_params['login_block_time']); } } catch (Horde_History_Exception $e) { throw new Horde_Auth_Exception($e); } } /** * Resets the bad login counter. * * @param string $userId The user to reset. * * @throws Horde_Auth_Exception */ protected function _resetBadLogins($userId) { if (!$this->_history_api) { throw new Horde_Auth_Exception('Unsupported.'); } try { $this->_history_api->removeByNames(array($userId . '@logins.failed')); } catch (Horde_History_Exception $e) { throw new Horde_Auth_Exception($e); } } /** * Updates a set of authentication credentials. * * @param string $oldID The old userId. * @param string $newID The new userId. * @param array $credentials The new credentials * * @throws Horde_Auth_Exception */ public function updateUser($oldID, $newID, $credentials) { throw new Horde_Auth_Exception('Unsupported.'); } /** * Deletes a set of authentication credentials. * * @param string $userId The userId to delete. * * @throws Horde_Auth_Exception */ public function removeUser($userId) { throw new Horde_Auth_Exception('Unsupported.'); } /** * Lists all users in the system. * * @param boolean $sort Sort the users? * * @return mixed The array of userIds. * @throws Horde_Auth_Exception */ public function listUsers($sort = false) { throw new Horde_Auth_Exception('Unsupported.'); } /** * Checks if $userId exists in the system. * * @param string $userId User ID for which to check * * @return boolean Whether or not $userId already exists. */ public function exists($userId) { try { $users = $this->listUsers(); return in_array($userId, $users); } catch (Horde_Auth_Exception $e) { return false; } } /** * Automatic authentication. * * Transparent authentication should set 'userId', 'credentials', or * 'params' in $this->_credentials as needed - these values will be used * to set the credentials in the session. * * Transparent authentication should normally never throw an error - false * should be returned. * * @return boolean Whether transparent login is supported. * @throws Horde_Auth_Exception */ public function transparent() { return false; } /** * Reset a user's password. Used for example when the user does not * remember the existing password. * * @param string $userId The user id for which to reset the password. * * @return string The new password on success. * @throws Horde_Auth_Exception */ public function resetPassword($userId) { throw new Horde_Auth_Exception('Unsupported.'); } /** * Queries the current driver to find out if it supports the given * capability. * * @param string $capability The capability to test for. * * @return boolean Whether or not the capability is supported. */ public function hasCapability($capability) { return !empty($this->_capabilities[$capability]); } /** * Returns the named parameter for the current auth driver. * * @param string $param The parameter to fetch. * * @return string The parameter's value, or null if it doesn't exist. */ public function getParam($param) { return isset($this->_params[$param]) ? $this->_params[$param] : null; } /** * Returns internal credential value(s). * * @param mixed $name The credential value to get. If null, will return * the entire credential list. Valid names: * - 'change': (boolean) Do credentials need to be changed? * - 'credentials': (array) The credentials needed to authenticate. * - 'expire': (integer) UNIX timestamp of the credential expiration date. * - 'userId': (string) The user ID. * * @return mixed The credential information, or null if the credential * doesn't exist. */ public function getCredential($name = null) { if (is_null($name)) { return $this->_credentials; } return isset($this->_credentials[$name]) ? $this->_credentials[$name] : null; } /** * Sets an internal credential value. * * @param string $type The credential name to set. See getCredential() * for the list of valid credentials/types. * @param mixed $value The credential value to set. */ public function setCredential($type, $value) { switch ($type) { case 'change': $this->_credentials['change'] = (bool)$value; break; case 'credentials': $this->_credentials['credentials'] = array_filter(array_merge($this->_credentials['credentials'], $value)); break; case 'expire': $this->_credentials['expire'] = intval($value); break; case 'userId': $this->_credentials['userId'] = strval($value); break; } } /** * Sets the error message for an invalid authentication. * * @param string $type The type of error (Horde_Auth::REASON_* constant). * @param string $msg The error message/reason for invalid * authentication. */ public function setError($type, $msg = null) { $this->_error = array( 'msg' => $msg, 'type' => $type ); } /** * Returns the error type or message for an invalid authentication. * * @param boolean $msg If true, returns the message string (if set). * * @return mixed Error type, error message (if $msg is true) or false * if entry doesn't exist. */ public function getError($msg = false) { return isset($this->_error['type']) ? ($msg ? $this->_error['msg'] : $this->_error['type']) : false; } } Horde_Auth-2.1.11/lib/Horde/Auth/Composite.php0000664000175000017500000001140512653661601017114 0ustar janjan * @category Horde * @license http://www.horde.org/licenses/lgpl21 LGPL-2.1 * @package Auth */ /** * The Horde_Auth_Composite class provides a way to combine two separate * drivers for admin vs. authentication purposes. * * @author Chuck Hagenbuch * @category Horde * @license http://www.horde.org/licenses/lgpl21 LGPL-2.1 * @package Auth */ class Horde_Auth_Composite extends Horde_Auth_Base { /** * Constructor. * * @param array $params Required parameters: *
     * 'admin_driver' - (Horde_Auth_Base) The admin driver.
     * 'auth_driver' - (Horde_Auth_Base) The auth driver.
     * 
* * @throws InvalidArgumentException */ public function __construct(array $params = array()) { foreach (array('admin_driver', 'auth_driver') as $val) { if (!isset($params[$val])) { throw new InvalidArgumentException('Missing ' . $val . ' parameter.'); } } parent::__construct($params); } /** * Find out if a set of login credentials are valid. * * @param string $userId The userId to check. * @param array $credentials The credentials to use. * * @throws Horde_Auth_Exception */ protected function _authenticate($userId, $credentials) { if (!$this->_params['auth_driver']->authenticate($userId, $credentials)) { throw new Horde_Auth_Exception($this->_params['auth_driver']->getError(true), $this->_params['auth_driver']->getError()); } } /** * Query the current Auth object to find out if it supports the given * capability. * * @param string $capability The capability to test for. * * @return boolean Whether or not the capability is supported. */ public function hasCapability($capability) { try { return $this->_params['admin_driver']->hasCapability($capability); } catch (Horde_Auth_Exception $e) { return false; } } /** * Automatic authentication. * * @return boolean Whether or not the client is allowed. */ public function transparent() { try { return $this->_params['auth_driver']->transparent(); } catch (Horde_Auth_Exception $e) { return false; } } /** * Add a set of authentication credentials. * * @param string $userId The userId to add. * @param array $credentials The credentials to use. * * @throws Horde_Auth_Exception */ public function addUser($userId, $credentials) { $this->_params['admin_driver']->addUser($userId, $credentials); } /** * Update a set of authentication credentials. * * @param string $oldID The old userId. * @param string $newID The new userId. * @param array $credentials The new credentials * * @throws Horde_Auth_Exception */ public function updateUser($oldID, $newID, $credentials) { $this->_params['admin_driver']->updateUser($oldID, $newID, $credentials); } /** * Reset a user's password. Used for example when the user does not * remember the existing password. * * @param string $userId The user id for which to reset the password. * * @return string The new password on success. * @throws Horde_Auth_Exception */ public function resetPassword($userId) { return $this->_params['admin_driver']->resetPassword($userId); } /** * Delete a set of authentication credentials. * * @param string $userId The userId to delete. * * @throws Horde_Auth_Exception */ public function removeUser($userId) { $this->_params['admin_driver']->removeUser($userId); } /** * Lists all users in the system. * * @param boolean $sort Sort the users? * * @return array The array of userIds. * @throws Horde_Auth_Exception */ public function listUsers($sort = false) { return $this->_params['admin_driver']->listUsers($sort); } /** * Checks if a userId exists in the system. * * @param string $userId User ID to check * * @return boolean Whether or not the userId already exists. */ public function exists($userId) { try { return $this->_params['admin_driver']->exists($userId); } catch (Horde_Auth_Exception $e) { return false; } } } Horde_Auth-2.1.11/lib/Horde/Auth/Customsql.php0000664000175000017500000002375312653661601017155 0ustar janjan * Copyright 2002-2016 Horde LLC (http://www.horde.org/) * * See the enclosed file COPYING for license information (LGPL). If you did * not receive this file, http://www.horde.org/licenses/lgpl21 * * @author Ronnie Garcia * @author Chuck Hagenbuch * @author Joel Vandal * @category Horde * @license http://opensource.org/licenses/lgpl-2.1.php LGPL-2.1 * @package Auth */ /** * The Horde_Auth_Customsql class provides a sql implementation of the Horde * authentication system with the possibility to set custom-made queries. * * @author Ronnie Garcia * @author Chuck Hagenbuch * @author Joel Vandal * @category Horde * @license http://opensource.org/licenses/lgpl-2.1.php LGPL-2.1 * @package Auth */ class Horde_Auth_Customsql extends Horde_Auth_Sql { /** * An array of capabilities, so that the driver can report which * operations it supports and which it doesn't. * * @var array */ protected $_capabilities = array( 'add' => true, 'list' => true, 'remove' => true, 'resetpassword' => true, 'update' => true, 'authenticate' => true, ); /** * Constructor. * * Some special tokens can be used in the SQL query. They are replaced * at the query stage: * '\L' will be replaced by the user's login * '\P' will be replaced by the user's password. * '\O' will be replaced by the old user's login (required for update) * * Eg: "SELECT * FROM users WHERE uid = \L * AND passwd = \P * AND billing = 'paid'" * * @param array $params Configuration parameters: * - query_auth: (string) Authenticate the user. ('\L' & '\P') * - query_add: (string) Add user. ('\L' & '\P') * - query_getpw: (string) Get one user's password. ('\L') * - query_update: (string) Update user. ('\O', '\L' & '\P') * - query_resetpassword: (string) Reset password. ('\L', & '\P') * - query_remove: (string) Remove user. ('\L') * - query_list: (string) List user. * - query_exists: (string) Check for existance of user. ('\L') */ public function __construct(array $params = array()) { foreach (array('query_auth', 'query_add', 'query_update', 'query_resetpassword', 'query_remove', 'query_list') as $val) { if (empty($params[$val])) { switch($val) { case 'query_auth': $this->_capabilities['authenticate'] = false; break; case 'query_add': $this->_capabilities['add'] = false; break; case 'query_update': $this->_capabilities['update'] = false; break; case 'query_resetpassword': $this->_capabilities['resetpassword'] = false; break; case 'query_remove': $this->_capabilities['remove'] = false; break; case 'query_list': $this->_capabilities['list'] = false; break; } } } parent::__construct($params); } /** * Find out if a set of login credentials are valid. * * @param string $userId The userId to check. * @param array $credentials The credentials to use. * * @throws Horde_Auth_Exception */ protected function _authenticate($userId, $credentials) { /* Build a custom query, based on the config file. */ $query = str_replace( array('\L', '\P'), array( $this->_db->quote($userId), $this->_db->quote(Horde_Auth::getCryptedPassword($credentials['password'], $this->_getPassword($userId), $this->_params['encryption'], $this->_params['show_encryption'])) ), $this->_params['query_auth'] ); try { if ($this->_db->selectValue($query)) { return; } throw new Horde_Auth_Exception('', Horde_Auth::REASON_BADLOGIN); } catch (Horde_Db_Exception $e) { throw new Horde_Auth_Exception('', Horde_Auth::REASON_FAILED); } } /** * Add a set of authentication credentials. * * @param string $userId The userId to add. * @param array $credentials The credentials to add. * * @throws Horde_Auth_Exception */ public function addUser($userId, $credentials) { /* Build a custom query, based on the config file. */ $query = str_replace( array('\L', '\P'), array( $this->_db->quote($userId), $this->_db->quote(Horde_Auth::getCryptedPassword($credentials['password'], '', $this->_params['encryption'], $this->_params['show_encryption'])) ), $this->_params['query_add'] ); try { $this->_db->insert($query); } catch (Horde_Db_Exception $e) { throw new Horde_Auth_Exception($e); } } /** * Update a set of authentication credentials. * * @param string $oldId The old userId. * @param string $newId The new userId. * @param array $credentials The new credentials * * @throws Horde_Auth_Exception */ public function updateUser($oldId, $newId, $credentials) { /* Build a custom query, based on the config file. */ $query = str_replace( array('\O', '\L', '\P'), array( $this->_db->quote($oldId), $this->_db->quote($newId), $this->_db->quote(Horde_Auth::getCryptedPassword($credentials['password'], $this->_getPassword($oldId), $this->_params['encryption'], $this->_params['show_encryption'])) ), $this->_params['query_update'] ); try { $this->_db->update($query); } catch (Horde_Db_Exception $e) { throw new Horde_Auth_Exception($e); } } /** * Resets a user's password. Used for example when the user does not * remember the existing password. * * @param string $userId The user id for which to reset the password. * * @return string The new password on success. * @throws Horde_Auth_Exception */ public function resetPassword($userId) { /* Get a new random password. */ $password = Horde_Auth::genRandomPassword(); /* Build the SQL query. */ $query = str_replace( array('\L', '\P'), array( $this->_db->quote($userId), $this->_db->quote(Horde_Auth::getCryptedPassword($password, '', $this->_params['encryption'], $this->_params['show_encryption'])) ), $this->_params['query_resetpassword'] ); try { $this->_db->update($query); } catch (Horde_Db_Exception $e) { throw new Horde_Auth_Exception($e); } return $password; } /** * Delete a set of authentication credentials. * * @param string $userId The userId to delete. * * @throws Horde_Auth_Exception */ public function removeUser($userId) { /* Build a custom query, based on the config file. */ $query = str_replace( '\L', $this->_db->quote($userId), $this->_params['query_remove'] ); try { $this->_db->delete($query); } catch (Horde_Db_Exception $e) { throw new Horde_Auth_Exception($e); } } /** * Lists all users in the system. * * @param boolean $sort Sort the users? * * @return array The array of userIds. * @throws Horde_Auth_Exception */ public function listUsers($sort = false) { /* Build a custom query, based on the config file. */ $query = str_replace( '\L', $this->_db->quote($this->_params['default_user']), $this->_params['query_list'] ); try { $users = $this->_db->selectValues($query); // Find a way to sort in database with portable SQL return $this->_sort($users, $sort); } catch (Horde_Db_Exception $e) { throw new Horde_Auth_Exception($e); } } /** * Checks if a userId exists in the system. * * @param string $userId User ID for which to check * * @return boolean Whether or not the userId already exists. */ public function exists($userId) { if (empty($this->_params['query_exists'])) { return parent::exists($userId); } /* Build a custom query, based on the config file. */ $query = str_replace( '\L', $this->_db->quote($userId), $this->_params['query_exists'] ); try { return (bool)$this->_db->selectValue($query); } catch (Horde_Db_Exception $e) { return false; } } /** * Fetch $userId's current password - needed for the salt with some * encryption schemes when doing authentication or updates. * * @param string $userId The userId to query. * * @return string $userId's current password. */ protected function _getPassword($userId) { /* Retrieve the old password in case we need the salt. */ $query = str_replace( '\L', $this->_db->quote($userId), $this->_params['query_getpw'] ); try { return $this->_db->selectValue($query); } catch (Horde_Db_Exception $e) { return null; } } } Horde_Auth-2.1.11/lib/Horde/Auth/Cyrsql.php0000664000175000017500000003562012653661601016434 0ustar janjan * @author Jan Schneider * @category Horde * @license http://www.horde.org/licenses/lgpl21 LGPL-2.1 * @package Auth */ /** * The Horde_Auth_Cyrsql class provides a SQL implementation of the Horde * authentication system for the Cyrus IMAP server. Most of the functionality * is the same as for the SQL class; only what is different overrides the * parent class implementations. * * The table structure for the auth system is as follows: *
 * CREATE TABLE accountuser (
 *     username    VARCHAR(255) BINARY NOT NULL DEFAULT '',
 *     password    VARCHAR(32) BINARY NOT NULL DEFAULT '',
 *     prefix      VARCHAR(50) NOT NULL DEFAULT '',
 *     domain_name VARCHAR(255) NOT NULL DEFAULT '',
 *     UNIQUE KEY username (username)
 * );
 *
 * CREATE TABLE adminuser (
 *     username    VARCHAR(50) BINARY NOT NULL DEFAULT '',
 *     password    VARCHAR(50) BINARY NOT NULL DEFAULT '',
 *     type        INT(11) NOT NULL DEFAULT '0',
 *     SID         VARCHAR(255) NOT NULL DEFAULT '',
 *     home        VARCHAR(255) NOT NULL DEFAULT '',
 *     PRIMARY KEY (username)
 * );
 *
 * CREATE TABLE alias (
 *     alias       VARCHAR(255) NOT NULL DEFAULT '',
 *     dest        LONGTEXT,
 *     username    VARCHAR(50) NOT NULL DEFAULT '',
 *     status      INT(11) NOT NULL DEFAULT '1',
 *     PRIMARY KEY (alias)
 * );
 *
 * CREATE TABLE domain (
 *     domain_name VARCHAR(255) NOT NULL DEFAULT '',
 *     prefix      VARCHAR(50) NOT NULL DEFAULT '',
 *     maxaccounts INT(11) NOT NULL DEFAULT '20',
 *     quota       INT(10) NOT NULL DEFAULT '20000',
 *     transport   VARCHAR(255) NOT NULL DEFAULT 'cyrus',
 *     freenames   ENUM('YES','NO') NOT NULL DEFAULT 'NO',
 *     freeaddress ENUM('YES','NO') NOT NULL DEFAULT 'NO',
 *     PRIMARY KEY (domain_name),
 *     UNIQUE KEY prefix (prefix)
 * );
 *
 * CREATE TABLE domainadmin (
 *     domain_name VARCHAR(255) NOT NULL DEFAULT '',
 *     adminuser   VARCHAR(255) NOT NULL DEFAULT ''
 * );
 *
 * CREATE TABLE search (
 *     search_id   VARCHAR(255) NOT NULL DEFAULT '',
 *     search_sql  TEXT NOT NULL,
 *     perpage     INT(11) NOT NULL DEFAULT '0',
 *     timestamp   TIMESTAMP(14) NOT NULL,
 *     PRIMARY KEY (search_id),
 *     KEY search_id (search_id)
 * );
 *
 * CREATE TABLE virtual (
 *     alias       VARCHAR(255) NOT NULL DEFAULT '',
 *     dest        LONGTEXT,
 *     username    VARCHAR(50) NOT NULL DEFAULT '',
 *     status      INT(11) NOT NULL DEFAULT '1',
 *     KEY alias (alias)
 * );
 *
 * CREATE TABLE log (
 *     id          INT(11) NOT NULL AUTO_INCREMENT,
 *     msg         TEXT NOT NULL,
 *     user        VARCHAR(255) NOT NULL DEFAULT '',
 *     host        VARCHAR(255) NOT NULL DEFAULT '',
 *     time        DATETIME NOT NULL DEFAULT '2000-00-00 00:00:00',
 *     pid         VARCHAR(255) NOT NULL DEFAULT '',
 *     PRIMARY KEY (id)
 * );
 * 
* * @author Ilya Krel * @author Jan Schneider * @category Horde * @license http://www.horde.org/licenses/lgpl21 LGPL-2.1 * @package Auth */ class Horde_Auth_Cyrsql extends Horde_Auth_Sql { /** * An array of capabilities, so that the driver can report which * operations it supports and which it doesn't. * * @var array */ protected $_capabilities = array( 'add' => true, 'list' => true, 'remove' => true, 'resetpassword' => false, 'update' => true, 'authenticate' => true, ); /** * Horde_Imap_Client object. * * @var Horde_Imap_Client_Base */ protected $_imap; /** * Constructor. * * @param array $params Parameters: * - domain_field: (string) If set to anything other than 'none' this is * used as field name where domain is stored. * DEFAULT: 'domain_name' * - folders: (array) An array of folders to create under username. * DEFAULT: NONE * - hidden_accounts: (array) An array of system accounts to hide from * the user interface. * DEFAULT: None. * - imap: (Horde_Imap_Client_Base) [REQUIRED] An IMAP client object. * - quota: (integer) The quota (in kilobytes) to grant on the mailbox. * DEFAULT: NONE * - userhierarchy: (string) The user hierarchy prefix (UTF-8). * DEFAULT: 'user.' * * @throws InvalidArgumentException */ public function __construct(array $params = array()) { if (!isset($params['imap']) || !($params['imap'] instanceof Horde_Imap_Client_Base)) { throw new InvalidArgumentException('Missing imap parameter.'); } $this->_imap = $params['imap']; unset($params['imap']); $params = array_merge(array( 'domain_field' => 'domain_name', 'folders' => array(), 'hidden_accounts' => array('cyrus'), 'quota' => null, 'userhierarchy' => 'user.' ), $params); parent::__construct($params); } /** * Find out if a set of login credentials are valid. * * @param string $userId The userId to check. * @param array $credentials The credentials to use. * * @throws Horde_Auth_Exception */ protected function _authenticate($userId, $credentials) { if (!empty($this->_params['domain_field']) && ($this->_params['domain_field'] != 'none')) { /* Build the SQL query with domain. */ $query = sprintf('SELECT * FROM %s WHERE %s = ? AND %s = ?', $this->_params['table'], $this->_params['username_field'], $this->_params['domain_field']); $values = explode('@', $userId); } else { /* Build the SQL query without domain. */ $query = sprintf('SELECT * FROM %s WHERE %s = ?', $this->_params['table'], $this->_params['username_field']); $values = array($userId); } try { $row = $this->_db->selectOne($query, $values); } catch (Horde_Db_Exception $e) { throw new Horde_Auth_Exception('', Horde_Auth::REASON_FAILED); } if (!$row || !$this->_comparePasswords($row[$this->_params['password_field']], $credentials['password'])) { throw new Horde_Auth_Exception('', Horde_Auth::REASON_BADLOGIN); } $now = time(); if (!empty($this->_params['hard_expiration_field']) && !empty($row[$this->_params['hard_expiration_field']]) && ($now > $row[$this->_params['hard_expiration_field']])) { throw new Horde_Auth_Exception('', Horde_Auth::REASON_EXPIRED); } if (!empty($this->_params['soft_expiration_field']) && !empty($row[$this->_params['soft_expiration_field']]) && ($now > $row[$this->_params['soft_expiration_field']])) { $this->setCredential('change', true); } } /** * Add a set of authentication credentials. * * @param string $userId The userId to add. * @param array $credentials The credentials to add. * * @throw Horde_Auth_Exception */ public function addUser($userId, $credentials) { if (!empty($this->_params['domain_field']) && ($this->_params['domain_field'] != 'none')) { list($name, $domain) = explode('@', $userId); $query = sprintf('INSERT INTO %s (%s, %s, %s) VALUES (?, ?, ?)', $this->_params['table'], $this->_params['username_field'], $this->_params['domain_field'], $this->_params['password_field']); $values = array( $name, $domain, Horde_Auth::getCryptedPassword($credentials['password'], '', $this->_params['encryption'], $this->_params['show_encryption']) ); $query2 = 'INSERT INTO virtual (alias, dest, username, status) VALUES (?, ?, ?, 1)'; $values2 = array($userId, $userId, $name); try { $this->_db->insert($query, $values); $this->_db->insert($query2, $values2); } catch (Horde_Db_Exception $e) { throw new Horde_Auth_Exception($e); } } else { parent::addUser($userId, $credentials); } $mailbox = $this->_params['userhierarchy']; try { $this->_imap->createMailbox($mailbox); $this->_imap->setACL($mailbox, $this->_params['cyradmin'], array('rights' => 'lrswipcda')); if (isset($this->_params['quota']) && ($this->_params['quota'] >= 0)) { $this->_imap->setQuota($mailbox, array('storage' => $this->_params['quota'])); } } catch (Horde_Imap_Client_Exception $e) { throw new Horde_Auth_Exception($e); } foreach ($this->_params['folders'] as $val) { try { $this->_imap->createMailbox($val); $this->_imap->setACL($val, $this->_params['cyradmin'], array('rights' => 'lrswipcda')); } catch (Horde_Imap_Client_Exception $e) {} } } /** * Delete a set of authentication credentials. * * @param string $userId The userId to delete. * * @throws Horde_Auth_Exception */ public function removeUser($userId) { if (!empty($this->_params['domain_field']) && ($this->_params['domain_field'] != 'none')) { list($name, $domain) = explode('@', $userId); /* Build the SQL query. */ $query = sprintf('DELETE FROM %s WHERE %s = ? and %s = ?', $this->_params['table'], $this->_params['username_field'], $this->_params['domain_field']); $values = array($name, $domain); $query2 = 'DELETE FROM virtual WHERE dest = ?'; $values2 = array($userId); try { $this->_db->delete($query, $values); $this->_db->delete($query2, $values2); } catch (Horde_Db_Exception $e) { throw new Horde_Auth_Exception($e); } } else { parent::removeUser($userId); } /* Set ACL for mailbox deletion. */ list($admin) = explode('@', $this->_params['cyradmin']); $mailbox = $this->_params['userhierarchy']; try { $this->_imap->setACL($mailbox, $admin, array('rights' => 'lrswipcda')); $this->_imap->deleteMailbox($mailbox); } catch (Horde_Imap_Client_Exception $e) { throw new Horde_Auth_Exception($e); } } /** * List all users in the system. * * @param boolean $sort Sort the users? * * @return mixed The array of userIds. * @throws Horde_Auth_Exception */ public function listUsers($sort = false) { if (!empty($this->_params['domain_field']) && ($this->_params['domain_field'] != 'none')) { /* Build the SQL query with domain. */ $query = sprintf('SELECT %s, %s FROM %s', $this->_params['username_field'], $this->_params['domain_field'], $this->_params['table']); } else { /* Build the SQL query without domain. */ $query = sprintf('SELECT %s FROM %s', $this->_params['username_field'], $this->_params['table']); } if ($sort) { $query .= sprintf(" ORDER BY %s", $this->_params['username_field']); } try { $result = $this->_db->selectAll($query); } catch (Horde_Db_Exception $e) { throw new Horde_Auth_Exception($e); } /* Loop through and build return array. */ $users = array(); if (!empty($this->_params['domain_field']) && ($this->_params['domain_field'] != 'none')) { foreach ($result as $ar) { if (!in_array($ar[$this->_params['username_field']], $this->_params['hidden_accounts'])) { $users[] = $ar[$this->_params['username_field']] . '@' . $ar[$this->_params['domain_field']]; } } } else { foreach ($result as $ar) { if (!in_array($ar[$this->_params['username_field']], $this->_params['hidden_accounts'])) { $users[] = $ar[$this->_params['username_field']]; } } } return $users; } /** * Update a set of authentication credentials. * * @param string $oldID The old userId. * @param string $newID The new userId. [NOT SUPPORTED] * @param array $credentials The new credentials * * @throws Horde_Auth_Exception */ public function updateUser($oldID, $newID, $credentials) { if (!empty($this->_params['domain_field']) && ($this->_params['domain_field'] != 'none')) { list($name, $domain) = explode('@', $oldID); /* Build the SQL query with domain. */ $query = sprintf( 'UPDATE %s SET %s = ? WHERE %s = ? and %s = ?', $this->_params['table'], $this->_params['password_field'], $this->_params['username_field'], $this->_params['domain_field'] ); $values = array( Horde_Auth::getCryptedPassword($credentials['password'], '', $this->_params['encryption'], $this->_params['show_encryption']), $name, $domain ); } else { /* Build the SQL query. */ $query = sprintf( 'UPDATE %s SET %s = ? WHERE %s = ?', $this->_params['table'], $this->_params['password_field'], $this->_params['username_field'] ); $values = array( Horde_Auth::getCryptedPassword($credentials['password'], '', $this->_params['encryption'], $this->_params['show_encryption']), $oldID ); } try { $this->_db->update($query, $values); } catch (Horde_Db_Exception $e) { throw new Horde_Auth_Exception($e); } } } Horde_Auth-2.1.11/lib/Horde/Auth/Exception.php0000664000175000017500000000132212653661601017105 0ustar janjan * @author Michael Slusarz * @category Horde * @license http://www.horde.org/licenses/lgpl21 LGPL-2.1 * @package Auth */ /** * Exception class for the Horde_Auth package. * * @author Chuck Hagenbuch * @author Michael Slusarz * @category Horde * @license http://www.horde.org/licenses/lgpl21 LGPL-2.1 * @package Auth */ class Horde_Auth_Exception extends Horde_Exception_Wrapped { } Horde_Auth-2.1.11/lib/Horde/Auth/Ftp.php0000664000175000017500000000425512653661601015710 0ustar janjan * @author Max Kalika * @category Horde * @license http://www.horde.org/licenses/lgpl21 LGPL-2.1 * @package Auth */ /** * The Horde_Auth_Ftp class provides an FTP implementation of the Horde * authentication system. * * @author Chuck Hagenbuch * @author Max Kalika * @category Horde * @license http://www.horde.org/licenses/lgpl21 LGPL-2.1 * @package Auth */ class Horde_Auth_Ftp extends Horde_Auth_Base { /** * Constructor. * * @param array $params Optional parameters: *
     * 'hostspec' - (string) The hostname or IP address of the FTP server.
     *              DEFAULT: 'localhost'
     * 'port' - (integer) The server port to connect to.
     *          DEFAULT: 21
     * 
* * @throws Horde_Auth_Exception */ public function __construct(array $params = array()) { if (!Horde_Util::extensionExists('ftp')) { throw new Horde_Auth_Exception(__CLASS__ . ': Required FTP extension not found. Compile PHP with the --enable-ftp switch.'); } $params = array_merge(array( 'hostspec' => 'localhost', 'port' => 21 ), $params); parent::__construct($params); } /** * Find out if a set of login credentials are valid. * * @param string $userId The userId to check. * @param array $credentials An array of login credentials. For FTP, * this must contain a password entry. * * @throws Horde_Auth_Exception */ protected function _authenticate($userId, $credentials) { $ftp = @ftp_connect($this->_params['hostspec'], $this->_params['port']); $res = $ftp && @ftp_login($ftp, $userId, $credentials['password']); @ftp_quit($ftp); if ($res) { throw new Horde_Auth_Exception('', Horde_Auth::REASON_BADLOGIN); } } } Horde_Auth-2.1.11/lib/Horde/Auth/Http.php0000664000175000017500000001005212653661601016066 0ustar janjan * @category Horde * @license http://www.horde.org/licenses/lgpl21 LGPL-2.1 * @package Auth */ /** * The Horde_Auth_Http class transparently logs users in to Horde using * already present HTTP authentication headers. * * @author Chuck Hagenbuch * @category Horde * @license http://www.horde.org/licenses/lgpl21 LGPL-2.1 * @package Auth */ class Horde_Auth_Http extends Horde_Auth_Base { /** * An array of capabilities, so that the driver can report which * operations it supports and which it doesn't. * * @var array */ protected $_capabilities = array( 'transparent' => true ); /** * Array of usernames and hashed passwords. * * @var array */ protected $_users = array(); /** * Constructor. * * @param array $params Optional parameters: *
     * 'encryption' - (string) Kind of passwords in the .htpasswd file.
     *                Either 'crypt-des' (standard crypted htpasswd entries)
     *                [DEFAULT] or 'aprmd5'. This information is used if
     *                you want to directly authenticate users with this
     *                driver, instead of relying on transparent auth.
     * 'htpasswd_file' - (string) TODO
     * 
*/ public function __construct(array $params = array()) { $params = array_merge(array( 'encryption' => 'crypt-des' ), $params); parent::__construct($params); if (!empty($this->_params['htpasswd_file'])) { $users = file($this->_params['htpasswd_file']); if (is_array($users)) { // Enable the list users capability. $this->_capabilities['list'] = true; foreach ($users as $line) { list($user, $pass) = explode(':', $line, 2); $this->_users[trim($user)] = trim($pass); } } } } /** * Find out if a set of login credentials are valid. Only supports * htpasswd files with DES passwords right now. * * @param string $userId The userId to check. * @param array $credentials An array of login credentials. For IMAP, * this must contain a password entry. * * @throws Horde_Auth_Exception */ protected function _authenticate($userId, $credentials) { if (empty($credentials['password']) || empty($this->_users[$userId])) { throw new Horde_Auth_Exception('', Horde_Auth::REASON_BADLOGIN); } $hash = Horde_Auth::getCryptedPassword($credentials['password'], $this->_users[$userId], $this->_params['encryption'], !empty($this->_params['show_encryption'])); if ($hash != $this->_users[$userId]) { throw new Horde_Auth_Exception('', Horde_Auth::REASON_BADLOGIN); } } /** * Lists all users in the system. * * @param boolean $sort Sort the users? * * @return array The array of userIds. */ public function listUsers($sort = false) { // this driver sorts by default $users = array_keys($this->_users); return $this->_sort($users, $sort); } /** * Automatic authentication: Find out if the client has HTTP * authentication info present. * * @return boolean Whether or not the client is allowed. */ public function transparent() { if (empty($_SERVER['PHP_AUTH_USER']) || empty($_SERVER['PHP_AUTH_PW'])) { return false; } $this->_credentials['userId'] = $_SERVER['PHP_AUTH_USER']; $this->_credentials['credentials'] = array( 'password' => Horde_Util::dispelMagicQuotes($_SERVER['PHP_AUTH_PW']) ); return true; } } Horde_Auth-2.1.11/lib/Horde/Auth/Imap.php0000664000175000017500000001527012653661601016044 0ustar janjan * @author Gaudenz Steinlin * @author Jan Schneider * @category Horde * @license http://www.horde.org/licenses/lgpl21 LGPL-2.1 * @package Auth */ /** * The Horde_Auth_Imap:: class provides an IMAP implementation of the Horde * authentication system. * * @author Chuck Hagenbuch * @author Gaudenz Steinlin * @author Jan Schneider * @category Horde * @license http://www.horde.org/licenses/lgpl21 LGPL-2.1 * @package Auth */ class Horde_Auth_Imap extends Horde_Auth_Base { /** * Imap client objects. * * @var array() */ protected $_imap = array(); /** * Constructor. * * @param array $params Optional parameters: * - admin_password: (string) The password of the administrator. * DEFAULT: null * - admin_user: (string) The name of a user with admin privileges. * DEFAULT: null * - hostspec: (string) The hostname or IP address of the server. * DEFAULT: 'localhost' * - port: (integer) The server port to which we will connect. * IMAP is generally 143, while IMAP-SSL is generally 993. * DEFAULT: Encryption port default * - secure: (string) The encryption to use. Either 'none', 'ssl', or * 'tls'. * DEFAULT: 'none' * - userhierarchy: (string) The hierarchy where user mailboxes are * stored (UTF-8). * DEFAULT: 'user.' */ public function __construct(array $params = array()) { $params = array_merge(array( 'admin_password' => null, 'admin_user' => null, 'hostspec' => '', 'port' => null, 'secure' => 'none', 'userhierarchy' => 'user.' ), $params); parent::__construct($params); if (!empty($this->_params['admin_user'])) { $this->_capabilities = array_merge($this->_capabilities, array( 'add' => true, 'list' => true, 'remove' => true )); } } /** * Find out if a set of login credentials are valid. * * @param string $userId The userId to check. * @param array $credentials An array of login credentials. For IMAP, * this must contain a password entry. * * @throws Horde_Auth_Exception */ protected function _authenticate($userId, $credentials) { try { $ob = $this->_getOb($userId, $credentials['password']); $ob->login(); } catch (Horde_Imap_Client_Exception $e) { throw new Horde_Auth_Exception('', Horde_Auth::REASON_BADLOGIN); } } /** * Add a set of authentication credentials. * * @param string $userId The userId to add. * @param array $credentials The credentials to use. * * @throws Horde_Auth_Exception */ public function addUser($userId, $credentials) { if (!$this->hasCapability('add')) { throw new Horde_Auth_Exception('Adding of users is not supported.'); } try { $ob = $this->_getOb($this->_params['admin_user'], $this->_params['admin_password']); $name = $this->_params['userhierarchy'] . $userId; $ob->createMailbox($name); $ob->setACL($name, $this->_params['admin_user'], array( 'rights' => 'lrswipcda' )); } catch (Horde_Imap_Client_Exception $e) { throw new Horde_Auth_Exception($e); } } /** * Delete a set of authentication credentials. * * @param string $userId The userId to delete. * * @throws Horde_Auth_Exception */ public function removeUser($userId) { if (!$this->hasCapability('remove')) { throw new Horde_Auth_Exception('Removing of users is not supported.'); } try { $ob = $this->_getOb($this->_params['admin_user'], $this->_params['admin_password']); $name = $this->_params['userhierarchy'] . $userId; $ob->setACL($name, $this->_params['admin_user'], array( 'rights' => 'lrswipcda' )); $ob->deleteMailbox($name); } catch (Horde_Imap_Client_Exception $e) { throw new Horde_Auth_Exception($e); } } /** * Lists all users in the system. * * @param boolean $sort Sort the users? * * @return array The array of userIds. * @throws Horde_Auth_Exception */ public function listUsers($sort = false) { if (!$this->hasCapability('list')) { throw new Horde_Auth_Exception('Listing of users is not supported.'); } try { $ob = $this->_getOb($this->_params['admin_user'], $this->_params['admin_password']); $list = $ob->listMailboxes($this->_params['userhierarchy'] . '%', Horde_Imap_Client::MBOX_ALL, array('flat' => true)); } catch (Horde_Imap_Client_Exception $e) { throw new Horde_Auth_Exception($e); } $users = empty($list) ? array() : preg_replace('/.*' . preg_quote($this->_params['userhierarchy'], '/') . '(.*)/', '\\1', $list); return $this->_sort($users, $sort); } /** * Get Horde_Imap_Client object. * * @param string $user Username. * @param string $pass Password. * * @return Horde_Imap_Client_Base IMAP client object. * @throws Horde_Auth_Exception */ protected function _getOb($user, $pass) { $sig = hash('md5', serialize(array($user, $pass))); if (!isset($this->_ob[$sig])) { $imap_config = array( 'hostspec' => empty($this->_params['hostspec']) ? null : $this->_params['hostspec'], 'password' => $pass, 'port' => empty($this->_params['port']) ? null : $this->_params['port'], 'secure' => ($this->_params['secure'] == 'none') ? null : $this->_params['secure'], 'username' => $user ); try { $this->_ob[$sig] = new Horde_Imap_Client_Socket($imap_config); } catch (InvalidArgumentException $e) { throw new Horde_Auth_Exception($e); } } return $this->_ob[$sig]; } } Horde_Auth-2.1.11/lib/Horde/Auth/Ipbasic.php0000664000175000017500000000600312653661601016522 0ustar janjan * @category Horde * @license http://www.horde.org/licenses/lgpl21 LGPL-2.1 * @package Auth */ /** * The Horde_Auth_Ipbasic class provides access control based on CIDR masks * (client IP addresses). * * It is not meant for user-based systems, but for times when you want a block * of IPs to be able to access a site, and that access is simply on/off - no * preferences, etc. * * @author Chuck Hagenbuch * @category Horde * @license http://www.horde.org/licenses/lgpl21 LGPL-2.1 * @package Auth */ class Horde_Auth_Ipbasic extends Horde_Auth_Base { /** * An array of capabilities, so that the driver can report which * operations it supports and which it doesn't. * * @var array */ protected $_capabilities = array( 'transparent' => true ); /** * Constructor. * * @param array $params Optional Parameters: *
     * 'blocks' - (array) CIDR masks which are allowed access.
     * 
*/ public function __construct(array $params = array()) { if (empty($params['blocks'])) { $params['blocks'] = array(); } elseif (!is_array($params['blocks'])) { $params['blocks'] = array($params['blocks']); } parent::__construct($params); } /** * Automatic authentication: Find out if the client matches an allowed IP * block. * * @return boolean Whether or not the client is allowed. */ public function transparent() { if (!isset($_SERVER['REMOTE_ADDR'])) { return false; } foreach ($this->_params['blocks'] as $cidr) { if ($this->_addressWithinCIDR($_SERVER['REMOTE_ADDR'], $cidr)) { $this->_credentials['userId'] = $cidr; return true; } } return false; } /** * Not implemented * * @param string $userId The userID to check. * @param array $credentials An array of login credentials. * * @throws Horde_Auth_Exception */ protected function _authenticate($userId, $credentials) { throw new Horde_Auth_Exception('Unsupported.'); } /** * Determine if an IP address is within a CIDR block. * * @param string $address The IP address to check. * @param string $cidr The block (e.g. 192.168.0.0/16) to test against. * * @return boolean Whether or not the address matches the mask. */ protected function _addressWithinCIDR($address, $cidr) { $address = ip2long($address); list($quad, $bits) = explode('/', $cidr); $bits = intval($bits); $quad = ip2long($quad); return (($address >> (32 - $bits)) == ($quad >> (32 - $bits))); } } Horde_Auth-2.1.11/lib/Horde/Auth/Kolab.php0000664000175000017500000000543212653661601016205 0ustar janjan * Copyright 2008-2016 Horde LLC (http://www.horde.org/) * * See the enclosed file COPYING for license information (LGPL). If you did * not receive this file, http://www.horde.org/licenses/lgpl21 * * @author Stuart Binge * @author Gunnar Wrobel * @category Horde * @license http://www.horde.org/licenses/lgpl21 LGPL-2.1 * @package Auth */ /** * The Horde_Auth_Kolab implementation of the Horde authentication system. * Derives from the Horde_Auth_Imap authentication object, and provides * parameters to it based on the global Kolab configuration. * * @author Stuart Binge * @author Gunnar Wrobel * @category Horde * @license http://www.horde.org/licenses/lgpl21 LGPL-2.1 * @package Auth */ class Horde_Auth_Kolab extends Horde_Auth_Base { /** * An array of capabilities, so that the driver can report which * operations it supports and which it doesn't. * * @var array */ protected $_capabilities = array( 'authenticate' => true ); /** * Constructor. * * @param array $params Parameters: *
     * 'kolab' - (Horde_Kolab_Session) [REQUIRED] TODO
     * 
* * @throws InvalidArgumentException */ public function __construct(array $params = array()) { if (!isset($params['kolab'])) { throw new InvalidArgumentException('Missing kolab parameter.'); } parent::__construct($params); } /** * Find out if a set of login credentials are valid. * * For Kolab this requires to identify the IMAP server the user should * be authenticated against before the credentials can be checked using * this server. The Kolab_Server module handles identification of the * correct IMAP server. * * @param string $userId The userId to check. * @param array $credentials An array of login credentials. For Kolab, * this must contain a "password" entry. * * @throws Horde_Auth_Exception */ protected function _authenticate($userId, $credentials) { try { $this->_params['kolab']->connect($userId, $credentials); } catch (Horde_Kolab_Session_Exception_Badlogin $e) { throw new Horde_Auth_Exception('', Horde_Auth::REASON_BADLOGIN); } catch (Horde_Kolab_Session_Exception $e) { if ($this->_logger) { $this->_logger->log($e, 'ERR'); } throw new Horde_Auth_Exception('', Horde_Auth::REASON_FAILED); } $this->_credentials['userId'] = $this->_params['kolab']->getMail(); return true; } } Horde_Auth-2.1.11/lib/Horde/Auth/Ldap.php0000664000175000017500000004476512653661601016051 0ustar janjan * @category Horde * @license http://www.horde.org/licenses/lgpl21 LGPL-2.1 * @package Auth */ /** * The Horde_Auth_Ldap class provides an LDAP implementation of the Horde * authentication system. * * 'preauthenticate' hook should return LDAP connection information in the * 'ldap' credentials key. * * @author Jon Parise * @category Horde * @license http://www.horde.org/licenses/lgpl21 LGPL-2.1 * @package Auth */ class Horde_Auth_Ldap extends Horde_Auth_Base { /** * An array of capabilities, so that the driver can report which * operations it supports and which it doesn't. * * @var array */ protected $_capabilities = array( 'add' => true, 'update' => true, 'resetpassword' => true, 'remove' => true, 'list' => true, 'authenticate' => true, ); /** * LDAP object * * @var Horde_Ldap */ protected $_ldap; /** * Constructor. * * @param array $params Required parameters: *
     * 'basedn' - (string) [REQUIRED] The base DN for the LDAP server.
     * 'filter' - (string) The LDAP formatted search filter to search for
     *            users. This setting overrides the 'objectclass' parameter.
     * 'ldap' - (Horde_Ldap) [REQUIRED] Horde LDAP object.
     * 'objectclass - (string|array): The objectclass filter used to search
     *                for users. Either a single or an array of objectclasses.
     * 'uid' - (string) [REQUIRED] The username search key.
     * 
* * @throws Horde_Auth_Exception * @throws InvalidArgumentException */ public function __construct(array $params = array()) { foreach (array('basedn', 'ldap', 'uid') as $val) { if (!isset($params[$val])) { throw new InvalidArgumentException(__CLASS__ . ': Missing ' . $val . ' parameter.'); } } if (!empty($params['ad'])) { $this->_capabilities['resetpassword'] = false; } $this->_ldap = $params['ldap']; unset($params['ldap']); parent::__construct($params); } /** * Checks for shadowLastChange and shadowMin/Max support and returns their * values. We will also check for pwdLastSet if Active Directory is * support is requested. For this check to succeed we need to be bound * to the directory. * * @param string $dn The dn of the user. * * @return array Array with keys being "shadowlastchange", "shadowmin" * "shadowmax", "shadowwarning" and containing their * respective values or false for no support. */ protected function _lookupShadow($dn) { /* Init the return array. */ $lookupshadow = array( 'shadowlastchange' => false, 'shadowmin' => false, 'shadowmax' => false, 'shadowwarning' => false ); /* According to LDAP standard, to read operational attributes, you * must request them explicitly. Attributes involved in password * expiration policy: * pwdlastset: Active Directory * shadow*: shadowUser schema * passwordexpirationtime: Sun and Fedora Directory Server */ try { $result = $this->_ldap->search(null, '(objectClass=*)', array( 'attributes' => array( 'pwdlastset', 'shadowmax', 'shadowmin', 'shadowlastchange', 'shadowwarning', 'passwordexpirationtime' ), 'scope' => 'base' )); } catch (Horde_Ldap_Exception $e) { return $lookupshadow; } if (!$result) { return $lookupshadow; } $info = reset($result); // TODO: 'ad'? if (!empty($this->_params['ad'])) { if (isset($info['pwdlastset'][0])) { /* Active Directory handles timestamps a bit differently. * Convert the timestamp to a UNIX timestamp. */ $lookupshadow['shadowlastchange'] = floor((($info['pwdlastset'][0] / 10000000) - 11644406783) / 86400) - 1; /* Password expiry attributes are in a policy. We cannot * read them so use the Horde config. */ $lookupshadow['shadowwarning'] = $this->_params['warnage']; $lookupshadow['shadowmin'] = $this->_params['minage']; $lookupshadow['shadowmax'] = $this->_params['maxage']; } } elseif (isset($info['passwordexpirationtime'][0])) { /* Sun/Fedora Directory Server uses a special attribute * passwordexpirationtime. It has precedence over shadow* * because it actually locks the expired password at the LDAP * server level. The correct way to check expiration should * be using LDAP controls, unfortunately PHP doesn't support * controls on bind() responses. */ $ldaptimepattern = "/([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})Z/"; if (preg_match($ldaptimepattern, $info['passwordexpirationtime'][0], $regs)) { /* Sun/Fedora Directory Server return expiration time, not * last change time. We emulate the behaviour taking it * back to maxage. */ $lookupshadow['shadowlastchange'] = floor(mktime($regs[4], $regs[5], $regs[6], $regs[2], $regs[3], $regs[1]) / 86400) - $this->_params['maxage']; /* Password expiry attributes are in not accessible policy * entry. */ $lookupshadow['shadowwarning'] = $this->_params['warnage']; $lookupshadow['shadowmin'] = $this->_params['minage']; $lookupshadow['shadowmax'] = $this->_params['maxage']; } elseif ($this->_logger) { $this->_logger->log('Wrong time format: ' . $info['passwordexpirationtime'][0], 'ERR'); } } else { if (isset($info['shadowmax'][0])) { $lookupshadow['shadowmax'] = $info['shadowmax'][0]; } if (isset($info['shadowmin'][0])) { $lookupshadow['shadowmin'] = $info['shadowmin'][0]; } if (isset($info['shadowlastchange'][0])) { $lookupshadow['shadowlastchange'] = $info['shadowlastchange'][0]; } if (isset($info['shadowwarning'][0])) { $lookupshadow['shadowwarning'] = $info['shadowwarning'][0]; } } return $lookupshadow; } /** * Find out if the given set of login credentials are valid. * * @param string $userId The userId to check. * @param array $credentials An array of login credentials. * * @throws Horde_Auth_Exception */ protected function _authenticate($userId, $credentials) { if (!strlen($credentials['password'])) { throw new Horde_Auth_Exception('', Horde_Auth::REASON_BADLOGIN); } /* Search for the user's full DN. */ $this->_ldap->bind(); try { $dn = $this->_ldap->findUserDN($userId); } catch (Horde_Exception_NotFound $e) { throw new Horde_Auth_Exception('', Horde_Auth::REASON_BADLOGIN); } catch (Horde_Exception_Ldap $e) { throw new Horde_Auth_Exception($e->getMessage(), Horde_Auth::REASON_MESSAGE); } /* Attempt to bind to the LDAP server as the user. */ try { $this->_ldap->bind($dn, $credentials['password']); // Be sure we rebind as the configured user. $this->_ldap->bind(); } catch (Horde_Ldap_Exception $e) { // Be sure we rebind as the configured user. $this->_ldap->bind(); if (Horde_Ldap::errorName($e->getCode() == 'LDAP_INVALID_CREDENTIALS')) { throw new Horde_Auth_Exception('', Horde_Auth::REASON_BADLOGIN); } throw new Horde_Auth_Exception($e->getMessage(), Horde_Auth::REASON_MESSAGE); } if ($this->_params['password_expiration'] == 'yes') { $shadow = $this->_lookupShadow($dn); if ($shadow['shadowmax'] && $shadow['shadowlastchange'] && $shadow['shadowwarning']) { $today = floor(time() / 86400); $toexpire = $shadow['shadowlastchange'] + $shadow['shadowmax'] - $today; $warnday = $shadow['shadowlastchange'] + $shadow['shadowmax'] - $shadow['shadowwarning']; if ($today >= $warnday) { $this->setCredential('expire', $toexpire); } if ($toexpire == 0) { $this->setCredential('change', true); } elseif ($toexpire < 0) { throw new Horde_Auth_Exception('', Horde_Auth::REASON_EXPIRED); } } } } /** * Add a set of authentication credentials. * * @param string $userId The userId to add. * @param array $credentials The credentials to be set. * * @throws Horde_Auth_Exception */ public function addUser($userId, $credentials) { if (!empty($this->_params['ad'])) { throw new Horde_Auth_Exception(__CLASS__ . ': Adding users is not supported for Active Directory.'); } if (isset($credentials['ldap'])) { $entry = $credentials['ldap']; $dn = $entry['dn']; /* Remove the dn entry from the array. */ unset($entry['dn']); } else { /* Try this simple default and hope it works. */ $dn = $this->_params['uid'] . '=' . $userId . ',' . $this->_params['basedn']; $entry['cn'] = $userId; $entry['sn'] = $userId; $entry[$this->_params['uid']] = $userId; $entry['objectclass'] = array_merge( array('top'), $this->_params['newuser_objectclass']); $entry['userPassword'] = Horde_Auth::getCryptedPassword( $credentials['password'], '', $this->_params['encryption'], 'true'); if ($this->_params['password_expiration'] == 'yes') { $entry['shadowMin'] = $this->_params['minage']; $entry['shadowMax'] = $this->_params['maxage']; $entry['shadowWarning'] = $this->_params['warnage']; $entry['shadowLastChange'] = floor(time() / 86400); } } try { $this->_ldap->add(Horde_Ldap_Entry::createFresh($dn, $entry)); } catch (Horde_Ldap_Exception $e) { throw new Horde_Auth_Exception(sprintf(__CLASS__ . ': Unable to add user "%s". This is what the server said: ', $userId) . $e->getMessage()); } } /** * Remove a set of authentication credentials. * * @param string $userId The userId to add. * @param string $dn TODO * * @throws Horde_Auth_Exception */ public function removeUser($userId, $dn = null) { if (!empty($this->_params['ad'])) { throw new Horde_Auth_Exception(__CLASS__ . ': Removing users is not supported for Active Directory'); } if (is_null($dn)) { /* Search for the user's full DN. */ try { $dn = $this->_ldap->findUserDN($userId); } catch (Horde_Exception_Ldap $e) { throw new Horde_Auth_Exception($e); } } try { $this->_ldap->delete($dn); } catch (Horde_Ldap_Exception $e) { throw new Horde_Auth_Exception(sprintf(__CLASS__ . ': Unable to remove user "%s"', $userId)); } } /** * Update a set of authentication credentials. * * @todo Clean this up for Horde 5. * * @param string $oldID The old userId. * @param string $newID The new userId. * @param array $credentials The new credentials. * @param string $olddn The old user DN. * @param string $newdn The new user DN. * * @throws Horde_Auth_Exception */ public function updateUser($oldID, $newID, $credentials, $olddn = null, $newdn = null) { if (!empty($this->_params['ad'])) { throw new Horde_Auth_Exception(__CLASS__ . ': Updating users is not supported for Active Directory.'); } if (is_null($olddn)) { /* Search for the user's full DN. */ try { $dn = $this->_ldap->findUserDN($oldID); } catch (Horde_Exception_Ldap $e) { throw new Horde_Auth_Exception($e); } $olddn = $dn; $newdn = preg_replace('/uid=.*?,/', 'uid=' . $newID . ',', $dn, 1); $shadow = $this->_lookupShadow($dn); /* If shadowmin hasn't yet expired only change when we are administrator */ if ($shadow['shadowlastchange'] && $shadow['shadowmin'] && ($shadow['shadowlastchange'] + $shadow['shadowmin'] > (time() / 86400))) { throw new Horde_Auth_Exception('Minimum password age has not yet expired'); } /* Set the lastchange field */ if ($shadow['shadowlastchange']) { $entry['shadowlastchange'] = floor(time() / 86400); } /* Encrypt the new password */ $entry['userpassword'] = Horde_Auth::getCryptedPassword( $credentials['password'], '', $this->_params['encryption'], 'true'); } else { $entry = $credentials; unset($entry['dn']); } try { if ($oldID != $newID) { $this->_ldap->move($olddn, $newdn); $this->_ldap->modify($newdn, array('replace' => $entry)); } else { $this->_ldap->modify($olddn, array('replace' => $entry)); } } catch (Horde_Ldap_Exception $e) { throw new Horde_Auth_Exception(sprintf(__CLASS__ . ': Unable to update user "%s"', $newID)); } } /** * Reset a user's password. Used for example when the user does not * remember the existing password. * * @param string $userId The user id for which to reset the password. * * @return string The new password on success. * @throws Horde_Auth_Exception */ public function resetPassword($userId) { if (!empty($this->_params['ad'])) { throw new Horde_Auth_Exception(__CLASS__ . ': Updating users is not supported for Active Directory.'); } /* Search for the user's full DN. */ try { $dn = $this->_ldap->findUserDN($userId); } catch (Horde_Exception_Ldap $e) { throw new Horde_Auth_Exception($e); } /* Get a new random password. */ $password = Horde_Auth::genRandomPassword(); /* Encrypt the new password */ $entry = array( 'userpassword' => Horde_Auth::getCryptedPassword($password, '', $this->_params['encryption'], 'true')); /* Set the lastchange field */ $shadow = $this->_lookupShadow($dn); if ($shadow['shadowlastchange']) { $entry['shadowlastchange'] = floor(time() / 86400); } /* Update user entry. */ try { $this->_ldap->modify($dn, array('replace' => $entry)); } catch (Horde_Ldap_Exception $e) { throw new Horde_Auth_Exception($e); } return $password; } /** * Lists all users in the system. * * @param boolean $sort Sort the users? * * @return array The array of userIds. * @throws Horde_Auth_Exception */ public function listUsers($sort = false) { $params = array( 'attributes' => array($this->_params['uid']), 'scope' => $this->_params['scope'], 'sizelimit' => isset($this->_params['sizelimit']) ? $this->_params['sizelimit'] : 0 ); /* Add a sizelimit, if specified. Default is 0, which means no limit. * Note: You cannot override a server-side limit with this. */ $userlist = array(); try { $search = $this->_ldap->search( $this->_params['basedn'], Horde_Ldap_Filter::build(array('filter' => $this->_params['filter'])), $params); $uid = Horde_String::lower($this->_params['uid']); foreach ($search as $val) { $userlist[] = $val->getValue($uid, 'single'); } } catch (Horde_Ldap_Exception $e) { } return $this->_sort($userlist, $sort); } /** * Checks if $userId exists in the LDAP backend system. * * @author Marco Ferrante, University of Genova (I) * * @param string $userId User ID for which to check * * @return boolean Whether or not $userId already exists. */ public function exists($userId) { $params = array( 'scope' => $this->_params['scope'] ); try { $uidfilter = Horde_Ldap_Filter::create($this->_params['uid'], 'equals', $userId); $classfilter = Horde_Ldap_Filter::build(array('filter' => $this->_params['filter'])); $search = $this->_ldap->search( $this->_params['basedn'], Horde_Ldap_Filter::combine('and', array($uidfilter, $classfilter)), $params); if ($search->count() < 1) { return false; } if ($search->count() > 1 && $this->_logger) { $this->_logger->log('Multiple LDAP entries with user identifier ' . $userId, 'WARN'); } return true; } catch (Horde_Ldap_Exception $e) { if ($this->_logger) { $this->_logger->log('Error searching LDAP user: ' . $e->getMessage(), 'ERR'); } return false; } } } Horde_Auth-2.1.11/lib/Horde/Auth/Login.php0000664000175000017500000000453212653661601016225 0ustar janjan * @category Horde * @license http://www.horde.org/licenses/lgpl21 LGPL-2.1 * @package Auth */ class Horde_Auth_Login extends Horde_Auth_Base { /** * List of users that should be excluded from being listed/handled * in any way by this driver. * * @var array */ protected $_exclude = array( 'root', 'daemon', 'bin', 'sys', 'sync', 'games', 'man', 'lp', 'mail', 'news', 'uucp', 'proxy', 'postgres', 'www-data', 'backup', 'operator', 'list', 'irc', 'gnats', 'nobody', 'identd', 'sshd', 'gdm', 'postfix', 'mysql', 'cyrus', 'ftp' ); /** * Constructs a new Login authentication object. * * @param array $params Optional parameters: *
     * 'location' - (string) Location of the su binary.
     *              DEFAULT: /bin/su
     * 
*/ public function __construct(array $params = array()) { if (empty($params['location'])) { $params['location'] = '/bin/su'; } parent::__construct($params); } /** * Find out if a set of login credentials are valid. * * @param string $userId The userId to check. * @param array $credentials An array of login credentials. * * @return boolean Whether or not the credentials are valid. */ protected function _authenticate($userId, $credentials) { if (empty($credentials['password'])) { throw new Horde_Auth_Exception('', Horde_Auth::REASON_BADLOGIN); } $proc = @popen($this->_location . ' -c /bin/true ' . $userId, 'w'); if (!is_resource($proc)) { throw new Horde_Auth_Exception('', Horde_Auth::REASON_FAILED); } fwrite($proc, $credentials['password']); if (@pclose($proc) !== 0) { throw new Horde_Auth_Exception('', Horde_Auth::REASON_FAILED); } } } Horde_Auth-2.1.11/lib/Horde/Auth/Msad.php0000664000175000017500000002276012653661601016044 0ustar janjan * @category Horde * @license http://www.horde.org/licenses/lgpl21 LGPL-2.1 * @package Auth */ /** * The Horde_Auth_Msad class provides an experimental MSAD extension of the * LDAP implementation of the Horde authentication system. * * @todo Use Horde_Ldap * * @author Francois Helly * @category Horde * @license http://www.horde.org/licenses/lgpl21 LGPL-2.1 * @package Auth */ class Horde_Auth_Msad extends Horde_Auth_Ldap { /** * Constructor. * * @param array $params A hash containing connection parameters. * * @throws Horde_Auth_Exception */ public function __construct($params = array()) { $params = array_merge(array( 'adduser' => true, 'authId' => 'initials', 'encryption' => 'msad', 'newuser_objectclass' => 'user', 'password_expiration' => 'no', 'port' => 389, 'ssl' => false, 'uid' => array('samaccountname') ), $params); if (!is_array($params['uid'])) { $params['uid'] = array($params['uid']); } /* Ensure we've been provided with all of the necessary parameters. */ //Horde::assertDriverConfig($params, 'auth', // array('hostspec', 'basedn'), 'authentication MSAD'); /* Adjust capabilities: depending on if SSL encryption is * enabled or not */ $this->_capabilities = array( 'add' => ($params['ssl'] || $params['adduser']), 'list' => true, 'remove' => true, 'resetpassword' => $params['ssl'], 'update' => $params['ssl'] ); parent::__construct($params); } /** * Add a set of authentication credentials. * * @param string $accountName The user sAMAccountName to find. * @param array $credentials The credentials to be set. * * @throws Horde_Auth_Exception */ public function addUser($accountName, $credentials) { /* Connect to the MSAD server. */ $this->_connect(); if (isset($credentials['ldap'])) { $dn = $credentials['ldap']['dn']; } else { $basedn = isset($credentials['basedn']) ? $credentials['basedn'] : $this->_params['basedn']; /* Set a default CN */ $dn = 'cn=' . $accountName . ',' . $basedn; $entry['cn'] = $accountName; $entry['samaccountname'] = $accountName; $entry['objectclass'][0] = "top"; $entry['objectclass'][1] = "person"; $entry['objectclass'][2] = "organizationalPerson"; $entry['objectclass'][3] = "user"; $entry['description'] = (isset($credentials['description'])) ? $credentials['description'] : 'New horde user'; if ($this->_params['ssl']) { $entry["AccountDisabled"] = false; } $entry['userPassword'] = Horde_Auth::getCryptedPassword($credentials['password'],'', $this->_params['encryption'], false); if (isset($this->_params['binddn'])) { $entry['manager'] = $this->_params['binddn']; } } $success = @ldap_add($this->_ds, $dn, $entry); if (!$success) { throw new Horde_Auth_Exception(sprintf(__CLASS__ . ': Unable to add user "%s". This is what the server said: ', $accountName) . ldap_error($this->_ds)); } @ldap_close($this->_ds); } /** * Remove a set of authentication credentials. * * @param string $accountName The user sAMAccountName to remove. * @param string $dn TODO * * @throws Horde_Auth_Exception */ public function removeUser($accountName, $dn = null) { /* Connect to the MSAD server. */ $this->_connect(); if (is_null($dn)) { /* Search for the user's full DN. */ $dn = $this->_findDN($accountName); } if (!@ldap_delete($this->_ds, $dn)) { throw new Horde_Auth_Exception(sprintf(__CLASS__ . ': Unable to remove user "%s"', $accountName)); } @ldap_close($this->_ds); } /** * Update a set of authentication credentials. * * @param string $oldId The old userId. * @param string $newId The new userId. * @param array $credentials The new credentials. * @param string $olddn The old user DN. * @param string $newdn The new user DN. * * @throws Horde_Auth_Exception */ public function updateUser($oldId, $newId, $credentials, $olddn = null, $newdn = null) { /* Connect to the MSAD server. */ $this->_connect(); if (isset($credentials['ldap'])) { $olddn = $credentials['ldap']['dn']; } else { /* Search for the user's full DN. */ $dn = $this->_findDN($oldId); /* Encrypt the new password */ if (isset($credentials['password'])) { $entry['userpassword'] = Horde_Auth::getCryptedPassword($credentials['password'],'', $this->_params['encryption'], true); } } if ($oldId != $newID) { $newdn = str_replace($oldId, $newID, $dn); ldap_rename($this->_ds, $olddn, $newdn, $this->_params['basedn'], true); $success = @ldap_modify($this->_ds, $newdn, $entry); } else { $success = @ldap_modify($this->_ds, $olddn, $entry); } if (!$success) { throw new Horde_Auth_Exception(sprintf(__CLASS__ . ': Unable to update user "%s"', $newID)); } @ldap_close($this->_ds); } /** * Reset a user's password. Used for example when the user does not * remember the existing password. * * @param string $user_id The user id for which to reset the password. * * @return string The new password on success. * @throws Horde_Auth_Exception */ public function resetPassword($user_id) { /* Get a new random password. */ $password = Horde_Auth::genRandomPassword() . '/'; $this->updateUser($user_id, $user_id, array('userPassword' => $password)); return $password; } /** * Does an ldap connect and binds as the guest user. * * @throws Horde_Auth_Exception */ protected function _connect() { /* Connect to the MSAD server. */ $ssl = ($this->_params['ssl']) ? 'ldaps://' : ''; $this->_ds = ldap_connect($ssl . $this->_params['hostspec'], $this->_params['port']); if (!$this->_ds) { throw new Horde_Auth_Exception('Failed to connect to MSAD server.'); } if ($this->_logger) { if (!ldap_set_option($this->_ds, LDAP_OPT_PROTOCOL_VERSION, 3)) { $this->_logger->log(sprintf('Set MSAD protocol version to %d failed: [%d] %s', 3, ldap_errno($conn), ldap_error($conn))); } if (!ldap_set_option($this->_ds, LDAP_OPT_REFERRALS, 0)) { $this->_logger->log(sprintf('Set MSAD referrals option to %d failed: [%d] %s', 0, ldap_errno($conn), ldap_error($conn))); } } if (isset($this->_params['binddn'])) { $bind = ldap_bind($this->_ds, $this->_params['binddn'], $this->_params['password']); } else { $bind = ldap_bind($this->_ds); } if (!$bind) { throw new Horde_Auth_Exception('Could not bind to MSAD server.'); } } /** * Find the user dn * * @param string $userId The user UID to find. * * @return string The user's full DN */ protected function _findDN($userId) { /* Search for the user's full DN. */ foreach ($this->_params['uid'] as $uid) { $entries = array($uid); if ($uid != $this->_params['authId']) { $entries[] = $this->_params['authId']; } $search = @ldap_search($this->_ds, $this->_params['basedn'], $uid . '=' . $userId, $entries ); /* Searching the tree is not successful */ if (!$search) { throw new Horde_Auth_Exception('Could not search the MSAD server.'); } /* Fetch the search result */ $result = @ldap_get_entries($this->_ds, $search); /* The result isn't empty: the DN was found */ if (is_array($result) && (count($result) > 1)) { break; } } if (!is_array($result) || (count($result) <= 1)) { throw new Horde_Auth_Exception('Empty result.'); } /* Be sure the horde userId is the configured one */ $this->_credentials['userId'] = $result[0][$this->_params['authId']][0]; return $result[0]['dn']; } } Horde_Auth-2.1.11/lib/Horde/Auth/Pam.php0000664000175000017500000000422612653661601015672 0ustar janjan * @category Horde * @license http://www.horde.org/licenses/lgpl21 LGPL-2.1 * @package Auth */ /** * The Horde_Auth_Pam:: class provides a PAM-based implementation of the Horde * authentication system. * * PAM (Pluggable Authentication Modules) is a flexible mechanism for * authenticating users. It has become the standard authentication system for * Linux, Solaris and FreeBSD. * * This driver relies on the PECL PAM package: * * http://pecl.php.net/package/PAM * * @author Jon Parise * @category Horde * @license http://www.horde.org/licenses/lgpl21 LGPL-2.1 * @package Auth */ class Horde_Auth_Pam extends Horde_Auth_Base { /** * Constructor. * * @param array $params Optional parameters: *
     * 'service' - (string) The name of the PAM service to use when
     *             authenticating.
     *             DEFAULT: php
     * 
* * @throws Horde_Auth_Exception */ public function __construct(array $params = array()) { if (!Horde_Util::extensionExists('pam')) { throw new Horde_Auth_Exception('PAM authentication is not available.'); } if (!empty($params['service'])) { ini_set('pam.servicename', $params['service']); } parent::__construct($params); } /** * Find out if a set of login credentials are valid. * * @param string $userId The userId to check. * @param array $credentials An array of login credentials. * * @throws Horde_Auth_Exception */ protected function _authenticate($userId, $credentials) { if (empty($credentials['password'])) { throw new Horde_Auth_Exception('', Horde_Auth::REASON_BADLOGIN); } $error = null; if (!pam_auth($userId, $credentials['password'], $error)) { throw new Horde_Auth_Exception($error); } } } Horde_Auth-2.1.11/lib/Horde/Auth/Passwd.php0000664000175000017500000003151412653661601016416 0ustar janjan * Copyright 2002-2016 Horde LLC (http://www.horde.org/) * * See the enclosed file COPYING for license information (LGPL). If you did * not receive this file, http://www.horde.org/licenses/lgpl21 * * @author Rasmus Lerdorf * @author Chuck Hagenbuch * @category Horde * @license http://www.horde.org/licenses/lgpl21 LGPL-2.1 * @package Auth */ /** * The Horde_Auth_Passwd class provides a passwd-file implementation of the * Horde authentication system. * * @author Rasmus Lerdorf * @author Chuck Hagenbuch * @category Horde * @license http://www.horde.org/licenses/lgpl21 LGPL-2.1 * @package Auth */ class Horde_Auth_Passwd extends Horde_Auth_Base { /** * An array of capabilities, so that the driver can report which * operations it supports and which it doesn't. * * @var array */ protected $_capabilities = array( 'list' => true, 'authenticate' => true, ); /** * Hash list of users. * * @var array */ protected $_users = null; /** * Array of groups and members. * * @var array */ protected $_groups = array(); /** * Filehandle for lockfile. * * @var resource */ protected $_fplock; /** * Locking state. * * @var boolean */ protected $_locked; /** * List of users that should be excluded from being listed/handled * in any way by this driver. * * @var array */ protected $_exclude = array( 'root', 'daemon', 'bin', 'sys', 'sync', 'games', 'man', 'lp', 'mail', 'news', 'uucp', 'proxy', 'postgres', 'www-data', 'backup', 'operator', 'list', 'irc', 'gnats', 'nobody', 'identd', 'sshd', 'gdm', 'postfix', 'mysql', 'cyrus', 'ftp', ); /** * Constructor. * * @param array $params Connection parameters: *
     * 'encryption' - (string) The encryption to use to store the password in
     *                the table (e.g. plain, crypt, md5-hex, md5-base64, smd5,
     *                sha, ssha, aprmd5).
     *                DEFAULT: 'crypt-des'
     * 'filename' - (string) [REQUIRED] The passwd file to use.
     * 'lock' - (boolean) Should we lock the passwd file? The password file
     *          cannot be changed (add, edit, or delete users) unless this is
     *          true.
     *          DEFAULT: false
     * 'show_encryption' - (boolean) Whether or not to prepend the encryption
     *                     in the password field.
     *                     DEFAULT: false
     * 
* * @throws InvalidArgumentException */ public function __construct(array $params = array()) { if (!isset($params['filename'])) { throw new InvalidArgumentException('Missing filename parameter.'); } $params = array_merge(array( 'encryption' => 'crypt-des', 'lock' => false, 'show_encryption' => false ), $params); parent::__construct($params); } /** * Writes changes to passwd file and unlocks it. Takes no arguments and * has no return value. Called on script shutdown. */ public function __destruct() { if ($this->_locked) { foreach ($this->_users as $user => $pass) { $data = $user . ':' . $pass; if ($this->_users[$user]) { $data .= ':' . $this->_users[$user]; } fputs($this->_fplock, $data . "\n"); } rename($this->_lockfile, $this->_params['filename']); flock($this->_fplock, LOCK_UN); $this->_locked = false; fclose($this->_fplock); } } /** * Queries the current Auth object to find out if it supports the given * capability. * * @param string $capability The capability to test for. * * @return boolean Whether or not the capability is supported. */ public function hasCapability($capability) { if ($this->_params['lock']) { switch ($capability) { case 'add': case 'update': case 'resetpassword': case 'remove': return true; } } return parent::hasCapability($capability); } /** * Read and, if requested, lock the password file. * * @throws Horde_Auth_Exception */ protected function _read() { if (is_array($this->_users)) { return; } if (empty($this->_params['filename'])) { throw new Horde_Auth_Exception('No password file set.'); } if ($this->_params['lock']) { $this->_fplock = fopen(sys_get_temp_dir() . '/passwd.lock', 'w'); flock($this->_fplock, LOCK_EX); $this->_locked = true; } $fp = fopen($this->_params['filename'], 'r'); if (!$fp) { throw new Horde_Auth_Exception("Couldn't open '" . $this->_params['filename'] . "'."); } $this->_users = array(); while (!feof($fp)) { $line = trim(fgets($fp, 256)); if (empty($line)) { continue; } $parts = explode(':', $line); if (!count($parts)) { continue; } $user = $parts[0]; $userinfo = array(); if (strlen($user) && !in_array($user, $this->_exclude)) { if (isset($parts[1])) { $userinfo['password'] = $parts[1]; } if (isset($parts[2])) { $userinfo['uid'] = $parts[2]; } if (isset($parts[3])) { $userinfo['gid'] = $parts[3]; } if (isset($parts[4])) { $userinfo['info'] = $parts[4]; } if (isset($parts[5])) { $userinfo['home'] = $parts[5]; } if (isset($parts[6])) { $userinfo['shell'] = $parts[6]; } $this->_users[$user] = $userinfo; } } fclose($fp); if (!empty($this->_params['group_filename'])) { $fp = fopen($this->_params['group_filename'], 'r'); if (!$fp) { throw new Horde_Auth_Exception("Couldn't open '" . $this->_params['group_filename'] . "'."); } $this->_groups = array(); while (!feof($fp)) { $line = trim(fgets($fp)); if (empty($line)) { continue; } $parts = explode(':', $line); $group = array_shift($parts); $users = array_pop($parts); $this->_groups[$group] = array_flip(preg_split('/\s*[,\s]\s*/', trim($users), -1, PREG_SPLIT_NO_EMPTY)); } fclose($fp); } } /** * Find out if a set of login credentials are valid. * * @param string $userId The userId to check. * @param array $credentials An array of login credentials. * * @throws Horde_Auth_Exception */ protected function _authenticate($userId, $credentials) { if (empty($credentials['password'])) { throw new Horde_Auth_Exception('', Horde_Auth::REASON_BADLOGIN); } try { $this->_read(); } catch (Horde_Auth_Exception $e) { if ($this->_logger) { $this->_logger->log($e, 'ERR'); } throw new Horde_Auth_Exception('', Horde_Auth::REASON_FAILED); } if (!isset($this->_users[$userId]) || !$this->_comparePasswords($this->_users[$userId]['password'], $credentials['password'])) { throw new Horde_Auth_Exception('', Horde_Auth::REASON_BADLOGIN); } if (!empty($this->_params['required_groups'])) { $allowed = false; foreach ($this->_params['required_groups'] as $group) { if (isset($this->_groups[$group][$userId])) { $allowed = true; break; } } if (!$allowed) { throw new Horde_Auth_Exception('', Horde_Auth::REASON_BADLOGIN); } } } /** * Lists all users in the system. * * @param boolean $sort Sort the users? * * @return array The array of userIds. * @throws Horde_Auth_Exception */ public function listUsers($sort = false) { $this->_read(); $users = array_keys($this->_users); if (empty($this->_params['required_groups'])) { return $this->_sort($users, $sort); } $groupUsers = array(); foreach ($this->_params['required_groups'] as $group) { $groupUsers = array_merge($groupUsers, array_intersect($users, array_keys($this->_groups[$group]))); } return $this->_sort($groupUsers, $sort); } /** * Add a set of authentication credentials. * * @param string $userId The userId to add. * @param array $credentials The credentials to add. * * @throws Horde_Auth_Exception */ public function addUser($userId, $credentials) { $this->_read(); if (!$this->_locked) { throw new Horde_Auth_Exception('Password file not locked'); } if (isset($this->_users[$userId])) { throw new Horde_Auth_Exception("Couldn't add user '$userId', because the user already exists."); } $this->_users[$userId] = array( 'password' => Horde_Auth::getCryptedPassword($credentials['password'], '', $this->_params['encryption'], $this->_params['show_encryption']), ); } /** * Update a set of authentication credentials. * * @param string $oldID The old userId. * @param string $newID The new userId. * @param array $credentials The new credentials * * @throws Horde_Auth_Exception */ public function updateUser($oldID, $newID, $credentials) { $this->_read(); if (!$this->_locked) { throw new Horde_Auth_Exception('Password file not locked'); } if (!isset($this->_users[$oldID])) { throw new Horde_Auth_Exception("Couldn't modify user '$oldID', because the user doesn't exist."); } $this->_users[$newID] = array( 'password' => Horde_Auth::getCryptedPassword($credentials['password'], '', $this->_params['encryption'], $this->_params['show_encryption']), ); return true; } /** * Reset a user's password. Used for example when the user does not * remember the existing password. * * @param string $userId The user id for which to reset the password. * * @return string The new password. * @throws Horde_Auth_Exception */ public function resetPassword($userId) { /* Get a new random password. */ $password = Horde_Auth::genRandomPassword(); $this->updateUser($userId, $userId, array('password' => $password)); return $password; } /** * Delete a set of authentication credentials. * * @param string $userId The userId to delete. * * @throws Horde_Auth_Exception */ public function removeUser($userId) { $this->_read(); if (!$this->_locked) { throw new Horde_Auth_Exception('Password file not locked'); } if (!isset($this->_users[$userId])) { throw new Horde_Auth_Exception("Couldn't delete user '$userId', because the user doesn't exist."); } unset($this->_users[$userId]); } /** * Compare an encrypted password to a plaintext string to see if * they match. * * @param string $encrypted The crypted password to compare against. * @param string $plaintext The plaintext password to verify. * * @return boolean True if matched, false otherwise. */ protected function _comparePasswords($encrypted, $plaintext) { return $encrypted == Horde_Auth::getCryptedPassword($plaintext, $encrypted, $this->_params['encryption'], $this->_params['show_encryption']); } } Horde_Auth-2.1.11/lib/Horde/Auth/Peclsasl.php0000664000175000017500000000503212653661601016717 0ustar janjan * @category Horde * @license http://www.horde.org/licenses/lgpl21 LGPL-2.1 * @package Auth */ /** * The Horde_Auth_Peclsasl:: class provides a SASL-based implementation of the * Horde authentication system. * * SASL is the Simple Authentication and Security Layer (as defined by RFC * 2222). It provides a system for adding plugable authenticating support to * connection-based protocols. * * This driver relies on the PECL sasl package: * http://pecl.php.net/package/sasl * * @author Jon Parise * @category Horde * @license http://www.horde.org/licenses/lgpl21 LGPL-2.1 * @package Auth */ class Horde_Auth_Peclsasl extends Horde_Auth_Base { /** * Constructor. * * @param array $params Optional parameters: *
     * 'app' - (string) The name of the authenticating application.
     *         DEFAULT: horde
     * 'service' - (string) The name of the SASL service to use when
     *             authenticating.
     *             DEFAULT: php
     * 
* * @throws Horde_Auth_Exception */ public function __construct(array $params = array()) { if (!Horde_Util::extensionExists('sasl')) { throw new Horde_Auth_Exception('Horde_Auth_Peclsasl:: requires the sasl PECL extension to be loaded.'); } $params = array_merge(array( 'app' => 'horde', 'service' => 'php' ), $params); parent::__construct($params); sasl_server_init($this->_params['app']); } /** * Find out if a set of login credentials are valid. * * @param string $userId The userId to check. * @param array $credentials An array of login credentials. * * @throws Horde_Auth_Exception */ protected function _authenticate($userId, $credentials) { if (empty($credentials['password'])) { throw new Horde_Auth_Exception('', Horde_Auth::REASON_BADLOGIN); } $conn = sasl_server_new($this->_params['service']); if (!is_resource($conn)) { throw new Horde_Auth_Exception('Failed to create new SASL connection.'); } if (!sasl_checkpass($conn, $userId, $credentials['password'])) { throw new Horde_Auth_Exception(sasl_errdetail($conn)); } } } Horde_Auth-2.1.11/lib/Horde/Auth/Radius.php0000664000175000017500000001137412653661601016406 0ustar janjan * @category Horde * @license http://www.horde.org/licenses/lgpl21 LGPL-2.1 * @package Auth */ /** * The Horde_Auth_Radius class provides a RADIUS implementation of the Horde * authentication system. * * This class requires the 'radius' PECL extension: * http://pecl.php.net/package/radius * * @author Michael Slusarz * @category Horde * @license http://www.horde.org/licenses/lgpl21 LGPL-2.1 * @package Auth */ class Horde_Auth_Radius extends Horde_Auth_Base { /** * Constructor. * * @param array $params Connection parameters. *
     * 'host' - (string) [REQUIRED] The RADIUS host to use (IP address or
     *          fully qualified hostname).
     * 'method' - (string) [REQUIRED] The RADIUS method to use for validating
     *            the request.
     *            Either: 'PAP', 'CHAP_MD5', 'MSCHAPv1', or 'MSCHAPv2'.
     *            ** CURRENTLY, only 'PAP' is supported. **
     * 'nas' - (string) The RADIUS NAS identifier to use.
     *         DEFAULT: The value of $_SERVER['HTTP_HOST'] or, if not
     *                  defined, then 'localhost'.
     * 'port' - (integer) The port to use on the RADIUS server.
     *          DEFAULT: Whatever the local system identifies as the
     *                   'radius' UDP port
     * 'retries' - (integer) The maximum number of repeated requests to make
     *             before giving up.
     *             DEFAULT: 3
     * 'secret' - (string) [REQUIRED] The RADIUS shared secret string for the
     *            host. The RADIUS protocol ignores all but the leading 128
     *            bytes of the shared secret.
     * 'suffix' - (string) The domain name to add to unqualified user names.
     *             DEFAULT: NONE
     * 'timeout' - (integer) The timeout for receiving replies from the server
     *             (in seconds).
     *             DEFAULT: 3
     * 
* * @throws InvalidArgumentException */ public function __construct(array $params = array()) { if (!Horde_Util::extensionExists('radius')) { throw new Horde_Auth_Exception(__CLASS__ . ': requires the radius PECL extension to be loaded.'); } foreach (array('host', 'secret', 'method') as $val) { if (!isset($params[$val])) { throw new InvalidArgumentException('Missing ' . $val . ' parameter.'); } } $params = array_merge(array( 'nas' => (isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : 'localhost'), 'port' => 0, 'retries' => 3, 'suffix' => '', 'timeout' => 3 ), $params); parent::__construct($params); } /** * Find out if a set of login credentials are valid. * * @param string $username The userId to check. * @param array $credentials An array of login credentials. * For radius, this must contain a password * entry. * * @throws Horde_Auth_Exception */ protected function _authenticate($username, $credentials) { /* Password is required. */ if (!isset($credentials['password'])) { throw new Horde_Auth_Exception('Password required for RADIUS authentication.'); } $res = radius_auth_open(); radius_add_server($res, $this->_params['host'], $this->_params['port'], $this->_params['secret'], $this->_params['timeout'], $this->_params['retries']); radius_create_request($res, RADIUS_ACCESS_REQUEST); radius_put_attr($res, RADIUS_NAS_IDENTIFIER, $this->_params['nas']); radius_put_attr($res, RADIUS_NAS_PORT_TYPE, RADIUS_VIRTUAL); radius_put_attr($res, RADIUS_SERVICE_TYPE, RADIUS_FRAMED); radius_put_attr($res, RADIUS_FRAMED_PROTOCOL, RADIUS_PPP); radius_put_attr($res, RADIUS_CALLING_STATION_ID, isset($_SERVER['REMOTE_HOST']) ? $_SERVER['REMOTE_HOST'] : '127.0.0.1'); /* Insert username/password into request. */ radius_put_attr($res, RADIUS_USER_NAME, $username); radius_put_attr($res, RADIUS_USER_PASSWORD, $credentials['password']); /* Send request. */ $success = radius_send_request($res); switch ($success) { case RADIUS_ACCESS_ACCEPT: break; case RADIUS_ACCESS_REJECT: throw new Horde_Auth_Exception('Authentication rejected by RADIUS server.'); default: throw new Horde_Auth_Exception(radius_strerror($res)); } } } Horde_Auth-2.1.11/lib/Horde/Auth/Shibboleth.php0000664000175000017500000000757512653661601017252 0ustar janjan * @category Horde * @license http://www.horde.org/licenses/lgpl21 LGPL-2.1 * @package Auth */ /** * The Horde_Auth_Shibboleth class only provides transparent authentication * based on the headers set by a Shibboleth SP. Note that this class does * not provide any actual SP functionality, it just takes the username * from the HTTP headers that should be set by the Shibboleth SP. * * @author Cassio Nishiguchi * @category Horde * @license http://www.horde.org/licenses/lgpl21 LGPL-2.1 * @package Auth */ class Horde_Auth_Shibboleth extends Horde_Auth_Base { /** * An array of capabilities, so that the driver can report which * operations it supports and which it doesn't. * * @var array */ protected $_capabilities = array( 'transparent' => true ); /** * Constructor. * * @param array $params Parameters: *
     * 'password_header' - (string) Name of the header holding the password of
     *                     the logged in user.
     * 'password_holder' - (string) Where the hordeauth password is stored.
     * 'password_preference' - (string) Name of the Horde preference holding
     *                         the password of the logged in user.
     * 'username_header' - (string) [REQUIRED] Name of the header holding the
     *                     username of the logged in user.
     * 
* * @throws InvalidArgumentException */ public function __construct(array $params = array()) { if (!isset($params['username_header'])) { throw new InvalidArgumentException('Missing username_header parameter.'); } $params = array_merge(array( 'password_header' => '', 'password_holder' => '', 'password_preference' => '' ), $params); parent::__construct($params); } /** * Not implemented. * * @param string $userId The userID to check. * @param array $credentials An array of login credentials. * * @throws Horde_Auth_Exception */ protected function _authenticate($userId, $credentials) { throw new Horde_Auth_Exception('Unsupported.'); } /** * Automatic authentication: checks if the username is set in the * configured header. * * @return boolean Whether or not the client is allowed. */ public function transparent() { if (empty($_SERVER[$this->_params['username_header']])) { return false; } $username = $_SERVER[$this->_params['username_header']]; // Remove scope from username, if present. $this->setCredential('userId', $this->_removeScope($username)); // Set password for hordeauth login. switch ($this->_params['password_holder']) { case 'header': $this->setCredential('credentials', array( 'password' => $_SERVER[$this->_params['password_header']] )); break; case 'preferences': $this->setCredential('credentials', array( 'password' => $_SERVER[$this->_params['password_preference']] )); break; } return true; } /** * Removes the scope from the user name, if present. * * @param string $username The full user name. * * @return string The user name without scope. */ protected function _removeScope($username) { $pos = strrpos($username, '@'); return ($pos !== false) ? substr($username, 0, $pos) : $username; } } Horde_Auth-2.1.11/lib/Horde/Auth/Smb.php0000664000175000017500000000633712653661601015703 0ustar janjan * @author Marcus I. Ryan * @category Horde * @license http://www.horde.org/licenses/lgpl21 LGPL-2.1 * @package Auth * @todo Add driver for other smbclient extensions https://github.com/eduardok/libsmbclient-php http://pecl.php.net/package/smbclient */ /** * The Horde_Auth_Smb class provides a SMB implementation of the Horde * authentication system. * * This module requires the smbauth extension for PHP: * http://tekrat.com/wp/smbauth/ * * At the time of this writing, the extension, and thus this module, only * supported authentication against a domain, and pdc and bdc must be non-null * and not equal to each other. In other words, to use this module you must * have a domain with at least one PDC and one BDC. * * @author Jon Parise * @author Marcus I. Ryan * @category Horde * @license http://www.horde.org/licenses/lgpl21 LGPL-2.1 * @package Auth */ class Horde_Auth_Smb extends Horde_Auth_Base { /** * Constructor. * * @param array $params Parameters: *
     * 'domain' - (string) [REQUIRED] The domain name to authenticate with.
     * 'group' - Group name that the user must be a member of.
     *           DEFAULT: none
     * 'hostspec' - (string) [REQUIRED] IP, DNS Name, or NetBios name of the
     *              SMB server to authenticate with.
     * 
* * @throws Horde_Auth_Exception * @throws InvalidArgumentException */ public function __construct(array $params = array()) { if (!Horde_Util::extensionExists('smbauth')) { throw new Horde_Auth_Exception(__CLASS__ . ': Required smbauth extension not found.'); } foreach (array('domain', 'hostspec') as $val) { if (empty($params[$val])) { throw new InvalidArgumentException('Missing ' . $val . ' parameter.'); } } $params = array_merge(array( 'group' => null ), $params); parent::__construct($params); } /** * Find out if the given set of login credentials are valid. * * @param string $userId The userId to check. * @param array $credentials An array of login credentials. * * @throws Horde_Auth_Exception */ public function _authenticate($userId, $credentials) { if (empty($credentials['password'])) { throw new Horde_Auth_Exception('', Horde_Auth::REASON_BADLOGIN); } /* Authenticate. */ $rval = validate($this->_params['hostspec'], $this->_params['domain'], empty($this->_params['group']) ? '' : $this->_params['group'], $userId, $credentials['password']); if ($rval === 1) { throw new Horde_Auth_Exception('Failed to connect to SMB server.'); } elseif ($rval !== 0) { throw new Horde_Auth_Exception(err2str()); } } } Horde_Auth-2.1.11/lib/Horde/Auth/Smbclient.php0000664000175000017500000000544712653661601017103 0ustar janjan * @author Marcus I. Ryan * @category Horde * @license http://www.horde.org/licenses/lgpl21 LGPL-2.1 * @package Auth * @todo Add driver for smbclient extension https://github.com/eduardok/libsmbclient-php */ /** * The Horde_Auth_Smbclient class provides an smbclient implementation of * the Horde authentication system. * * @author Jon Parise * @author Marcus I. Ryan * @category Horde * @license http://www.horde.org/licenses/lgpl21 LGPL-2.1 * @package Auth */ class Horde_Auth_Smbclient extends Horde_Auth_Base { /** * Constructor. * * @param array $params Parameters: *
     * 'domain' - (string) [REQUIRED] The domain name to authenticate with.
     * 'group' - Group name that the user must be a member of.
     *           DEFAULT: none
     * 'hostspec' - (string) [REQUIRED] IP, DNS Name, or NetBios name of the
     *              SMB server to authenticate with.
     * 'smbclient_path' - (string) [REQUIRED] The location of the smbclient
     *                    utility.
     * 
* * @throws InvalidArgumentException */ public function __construct(array $params = array()) { foreach (array('hostspec', 'domain', 'smbclient_path') as $val) { if (empty($params[$val])) { throw new InvalidArgumentException('Missing ' . $val . ' parameter.'); } } parent::__construct($params); } /** * Find out if the given set of login credentials are valid. * * @param string $userId The userId to check. * @param array $credentials An array of login credentials. * * @throws Horde_Auth_Exception */ protected function _authenticate($userId, $credentials) { if (empty($credentials['password'])) { throw new Horde_Auth_Exception('', Horde_Auth::REASON_BADLOGIN); } /* Authenticate. */ $cmdline = implode(' ', array( $this->_params['smbclient_path'], '-L', $this->_params['hostspec'], '-W', $this->_params['domain'], '-U', $userId )); $sc = popen($cmdline, 'w'); if ($sc === false) { throw new Horde_Auth_Exception('Unable to execute smbclient.'); } fwrite($sc, $credentials['password']); $rc = pclose($sc); if (intval($rc & 0xff) != 0) { throw new Horde_Auth_Exception('', Horde_Auth::REASON_BADLOGIN); } } } Horde_Auth-2.1.11/lib/Horde/Auth/Sql.php0000664000175000017500000003320012653661601015706 0ustar janjan * @category Horde * @license http://www.horde.org/licenses/lgpl21 LGPL-2.1 * @package Auth */ /** * The Horde_Auth_Sql class provides a SQL implementation of the Horde * authentication system. * * The table structure for the Auth system needs to be created with the shipped * migration scripts. See "horde-db-migrate-component --help" for details. * * @author Chuck Hagenbuch * @category Horde * @license http://www.horde.org/licenses/lgpl21 LGPL-2.1 * @package Auth */ class Horde_Auth_Sql extends Horde_Auth_Base { /** * An array of capabilities, so that the driver can report which * operations it supports and which it doesn't. * * @var array */ protected $_capabilities = array( 'add' => true, 'list' => true, 'remove' => true, 'resetpassword' => true, 'update' => true, 'authenticate' => true, ); /** * Handle for the current database connection. * * @var Horde_Db_Adapter */ protected $_db; /** * Constructor * * @param array $params Parameters: * 'db' - (Horde_Db_Adapter) [REQUIRED] Database object. *
     * 'encryption' - (string) The encryption to use to store the password in
     *                the table (e.g. plain, crypt, md5-hex, md5-base64, smd5,
     *                sha, ssha, aprmd5).
     *                DEFAULT: 'md5-hex'
     * 'hard_expiration_field' - (string) The name of the field containing a
     *                           date after which the account is no longer
     *                           valid and the user will not be able to log in
     *                           at all.
     *                           DEFAULT: none
     * 'password_field' - (string) The name of the password field in the auth
     *                    table.
     *                    DEFAULT: 'user_pass'
     * 'show_encryption' - (boolean) Whether or not to prepend the encryption
     *                     in the password field.
     *                     DEFAULT: false
     * 'soft_expiration_field' - (string) The name of the field containing a
     *                           date after which the system will request the
     *                           user change his or her password.
     *                           DEFAULT: none
     * 'table' - (string) The name of the SQL table to use in 'database'.
     *           DEFAULT: 'horde_users'
     * 'username_field' - (string) The name of the username field in the auth
     *                    table.
     *                    DEFAULT: 'user_uid'
     * 
* * @throws InvalidArgumentException */ public function __construct(array $params = array()) { if (!isset($params['db'])) { throw new InvalidArgumentException('Missing db parameter.'); } $this->_db = $params['db']; unset($params['db']); $params = array_merge(array( 'encryption' => 'md5-hex', 'password_field' => 'user_pass', 'show_encryption' => false, 'table' => 'horde_users', 'username_field' => 'user_uid', 'soft_expiration_field' => null, 'soft_expiration_window' => null, 'hard_expiration_field' => null, 'hard_expiration_window' => null ), $params); parent::__construct($params); /* Only allow limits when there is a storage configured */ if ((empty($params['soft_expiration_field'])) && ($params['soft_expiration_window'] > 0)) { throw new InvalidArgumentException('You cannot set [soft_expiration_window] without [soft_expiration_field].'); } if (($params['hard_expiration_field'] == '') && ($params['hard_expiration_window'] > 0)) { throw new InvalidArgumentException('You cannot set [hard_expiration_window] without [hard_expiration_field].'); } } /** * Find out if a set of login credentials are valid. * * @param string $userId The userId to check. * @param array $credentials The credentials to use. * * @throws Horde_Auth_Exception */ protected function _authenticate($userId, $credentials) { /* Build the SQL query. */ $query = sprintf('SELECT * FROM %s WHERE %s = ?', $this->_params['table'], $this->_params['username_field']); $values = array($userId); try { $row = $this->_db->selectOne($query, $values); } catch (Horde_Db_Exception $e) { throw new Horde_Auth_Exception('', Horde_Auth::REASON_FAILED); } if (!$row || !$this->_comparePasswords($row[$this->_params['password_field']], $credentials['password'])) { throw new Horde_Auth_Exception('', Horde_Auth::REASON_BADLOGIN); } $now = time(); if (!empty($this->_params['hard_expiration_field']) && !empty($row[$this->_params['hard_expiration_field']]) && ($now > $row[$this->_params['hard_expiration_field']])) { throw new Horde_Auth_Exception('', Horde_Auth::REASON_EXPIRED); } if (!empty($this->_params['soft_expiration_field']) && !empty($row[$this->_params['soft_expiration_field']]) && ($now > $row[$this->_params['soft_expiration_field']])) { $this->setCredential('change', true); $this->setCredential('expire', $now); } } /** * Add a set of authentication credentials. * * @param string $userId The userId to add. * @param array $credentials The credentials to add. * * @throws Horde_Auth_Exception */ public function addUser($userId, $credentials) { /* Build the SQL query. */ $query = sprintf('INSERT INTO %s (%s, %s', $this->_params['table'], $this->_params['username_field'], $this->_params['password_field']); $query_values_part = ' VALUES (?, ?'; $values = array($userId, Horde_Auth::getCryptedPassword($credentials['password'], '', $this->_params['encryption'], $this->_params['show_encryption'])); if (!empty($this->_params['soft_expiration_field'])) { $query .= sprintf(', %s', $this->_params['soft_expiration_field']); $query_values_part .= ', ?'; $values[] = $this->_calc_expiration('soft'); } if (!empty($this->_params['hard_expiration_field'])) { $query .= sprintf(', %s', $this->_params['hard_expiration_field']); $query_values_part .= ', ?'; $values[] = $this->_calc_expiration('hard'); } $query .= ')' . $query_values_part . ')'; try { $this->_db->insert($query, $values); } catch (Horde_Db_Exception $e) { throw new Horde_Auth_Exception($e); } } /** * Update a set of authentication credentials. * * @param string $oldID The old userId. * @param string $newID The new userId. * @param array $credentials The new credentials * * @throws Horde_Auth_Exception */ public function updateUser($oldID, $newID, $credentials) { $query = sprintf('UPDATE %s SET ', $this->_params['table']); $values = array(); /* Build the SQL query. */ $query .= $this->_params['username_field'] . ' = ?'; $values[] = $newID; $query .= ', ' . $this->_params['password_field'] . ' = ?'; $values[] = Horde_Auth::getCryptedPassword($credentials['password'], '', $this->_params['encryption'], $this->_params['show_encryption']); if (!empty($this->_params['soft_expiration_field'])) { $query .= ', ' . $this->_params['soft_expiration_field'] . ' = ?'; $values[] = $this->_calc_expiration('soft'); } if (!empty($this->_params['hard_expiration_field'])) { $query .= ', ' . $this->_params['hard_expiration_field'] . ' = ?'; $values[] = $this->_calc_expiration('hard'); } $query .= sprintf(' WHERE %s = ?', $this->_params['username_field']); $values[] = $oldID; try { $this->_db->update($query, $values); } catch (Horde_Db_Exception $e) { throw new Horde_Auth_Exception($e); } } /** * Reset a user's password. Used for example when the user does not * remember the existing password. * * @param string $userId The user id for which to reset the password. * * @return string The new password on success. * @throws Horde_Auth_Exception */ public function resetPassword($userId) { /* Get a new random password. */ $password = Horde_Auth::genRandomPassword(); /* Build the SQL query. */ $query = sprintf('UPDATE %s SET %s = ?', $this->_params['table'], $this->_params['password_field']); $values = array(Horde_Auth::getCryptedPassword($password, '', $this->_params['encryption'], $this->_params['show_encryption'])); if (!empty($this->_params['soft_expiration_field'])) { $query .= ', ' . $this->_params['soft_expiration_field'] . ' = ?'; $values[] = $this->_calc_expiration('soft'); } if (!empty($this->_params['hard_expiration_field'])) { $query .= ', ' . $this->_params['hard_expiration_field'] . ' = ?'; $values[] = $this->_calc_expiration('hard'); } $query .= sprintf(' WHERE %s = ?', $this->_params['username_field']); $values[] = $userId; try { $this->_db->update($query, $values); } catch (Horde_Db_Exception $e) { throw new Horde_Auth_Exception($e); } return $password; } /** * Delete a set of authentication credentials. * * @param string $userId The userId to delete. * * @throws Horde_Auth_Exception */ public function removeUser($userId) { /* Build the SQL query. */ $query = sprintf('DELETE FROM %s WHERE %s = ?', $this->_params['table'], $this->_params['username_field']); $values = array($userId); try { $this->_db->delete($query, $values); } catch (Horde_Db_Exception $e) { throw new Horde_Auth_Exception($e); } } /** * List all users in the system. * * @param boolean $sort Sort the users? * * @return array The array of userIds. * @throws Horde_Auth_Exception */ public function listUsers($sort = false) { /* Build the SQL query. */ $query = sprintf('SELECT %s FROM %s', $this->_params['username_field'], $this->_params['table']); if ($sort) { $query .= sprintf(' ORDER BY %s ASC', $this->_params['username_field']); } try { return $this->_db->selectValues($query); } catch (Horde_Db_Exception $e) { throw new Horde_Auth_Exception($e); } } /** * Checks if a userId exists in the system. * * @param string $userId User ID for which to check * * @return boolean Whether or not the userId already exists. */ public function exists($userId) { /* Build the SQL query. */ $query = sprintf('SELECT 1 FROM %s WHERE %s = ?', $this->_params['table'], $this->_params['username_field']); $values = array($userId); try { return (bool)$this->_db->selectValue($query, $values); } catch (Horde_Db_Exception $e) { return false; } } /** * Compare an encrypted password to a plaintext string to see if * they match. * * @param string $encrypted The crypted password to compare against. * @param string $plaintext The plaintext password to verify. * * @return boolean True if matched, false otherwise. */ protected function _comparePasswords($encrypted, $plaintext) { return $encrypted == Horde_Auth::getCryptedPassword($plaintext, $encrypted, $this->_params['encryption'], $this->_params['show_encryption']); } /** * Calculate a timestamp and return it along with the field name * * @param string $type The timestamp parameter. * * @return integer 'timestamp' intended field value or null */ private function _calc_expiration($type) { if (empty($this->_params[$type . '_expiration_window'])) { return null; } else { $now = new Horde_Date(time()); return $now->add(array('mday' => $this->_params[$type.'_expiration_window']))->timestamp(); } } } Horde_Auth-2.1.11/lib/Horde/Auth/Translation.php0000664000175000017500000000167112653661601017454 0ustar janjan * @category Horde * @license http://www.horde.org/licenses/lgpl21 LGPL-2.1 * @package Auth */ /** * Horde_Auth_Translation is the translation wrapper class for Horde_Auth. * * @author Jan Schneider * @category Horde * @license http://www.horde.org/licenses/lgpl21 LGPL-2.1 * @package Auth */ class Horde_Auth_Translation extends Horde_Translation_Autodetect { /** * The translation domain * * @var string */ protected static $_domain = 'Horde_Auth'; /** * The absolute PEAR path to the translations for the default gettext handler. * * @var string */ protected static $_pearDirectory = '@data_dir@'; } Horde_Auth-2.1.11/lib/Horde/Auth/X509.php0000664000175000017500000001163112653661601015620 0ustar janjan * @category Horde * @license http://www.horde.org/licenses/lgpl21 LGPL-2.1 * @package Auth * @since 2.0.7 */ /** * The Horde_Auth_X509 class provides an authentication driver for using X509 * client certificates. Since X509 certificates do not provide the password, * if the server setup requires the use of per-user passwords, a callback * function may be passed to obtain it from. * * @author Michael J Rubinsky * @category Horde * @license http://www.horde.org/licenses/lgpl21 LGPL-2.1 * @package Auth * @since 2.0.7 */ class Horde_Auth_X509 extends Horde_Auth_Base { /** * An array of capabilities, so that the driver can report which * operations it supports and which it doesn't. * * @var array */ protected $_capabilities = array( 'transparent' => true ); /** * Constructor. * * @param array $params Parameters: * - password: (string) If available, the password to use for the session. * DEFAULT: no password used. * - username_field: (string) Name of the $_SERVER field that * the username can be found in. DEFAULT: 'SSL_CLIENT_S_DN_EMAILADDRESS'. * - certificate_field: (string) Name of the $_SERVER field that contains * the full certificate. DEFAULT: 'SSL_CLIENT_CERT' * - ignore_purpose: (boolean) If true, will ignore any usage restrictions * on the presented client certificate. I.e., if openssl_x509_checkpurpose * returns false, authentication may still proceed. DEFAULT: false - ONLY * ENABLE THIS IF YOU KNOW WHY YOU ARE DOING SO. * - filter: (array) An array where the keys are field names and the * values are the values those certificate fields MUST * match to be considered valid. Keys in the format of * fieldone:fieldtwo will be taken as parent:child. * DEFAULT: no additionachecks applied. * * @throws InvalidArgumentException */ public function __construct(array $params = array()) { $params = array_merge(array( 'password' => false, 'username_field' => 'SSL_CLIENT_S_DN_CN', 'certificate_field' => 'SSL_CLIENT_CERT', 'ignore_purpose' => true, 'filter' => array() ), $params); parent::__construct($params); } /** * Not implemented. * * @param string $userId The userID to check. * @param array $credentials An array of login credentials. * * @throws Horde_Auth_Exception */ protected function _authenticate($userId, $credentials) { throw new Horde_Auth_Exception('Unsupported.'); } /** * Automatic authentication: checks if the username is set in the * configured header. * * @return boolean Whether or not the client is allowed. */ public function transparent() { if (!is_callable('openssl_x509_parse')) { throw new Horde_Auth_Exception('SSL not enabled on server.'); } if (empty($_SERVER[$this->_params['username_field']]) || empty($_SERVER[$this->_params['certificate_field']])) { return false; } // Valid for client auth? $cert = openssl_x509_read($_SERVER[$this->_params['certificate_field']]); if (!$this->_params['ignore_purpose'] && !openssl_x509_checkpurpose($cert, X509_PURPOSE_SSL_CLIENT) && !openssl_x509_checkpurpose($cert, X509_PURPOSE_ANY)) { return false; } $c_parsed = openssl_x509_parse($cert); foreach ($this->_params['filter'] as $key => $value) { $keys = explode(':', $key); $c = $c_parsed; foreach ($keys as $k) { $c = $c[$k]; } if ($c != $value) { return false; } } // Handle any custom validation added by sub classes. if (!$this->_validate($cert)) { return false; } // Free resources. openssl_x509_free($cert); // Set credentials $this->setCredential('userId', $_SERVER[$this->_params['username_field']]); $cred = array('certificate_id' => $c_parsed['hash']); if (!empty($this->_params['password'])) { $cred['password'] = $this->_params['password']; } $this->setCredential('credentials', $cred); return true; } /** * Perform additional validation of certificate fields. * * @return boolean */ protected function _validate($certificate) { return true; } } Horde_Auth-2.1.11/lib/Horde/Auth.php0000664000175000017500000004777312653661601015173 0ustar janjan * @author Michael Slusarz * @category Horde * @license http://www.horde.org/licenses/lgpl21 LGPL-2.1 * @package Auth */ /** * The Horde_Auth class provides some useful authentication-related utilities * and constants for the Auth package. * * @author Chuck Hagenbuch * @author Michael Slusarz * @category Horde * @license http://www.horde.org/licenses/lgpl21 LGPL-2.1 * @package Auth */ class Horde_Auth { /** * Authentication failure reasons. * *
     * REASON_BADLOGIN - Bad username and/or password
     * REASON_FAILED   - Login failed
     * REASON_EXPIRED  - Password has expired
     * REASON_LOGOUT   - Logout due to user request
     * REASON_MESSAGE  - Logout with custom message
     * REASON_SESSION  - Logout due to session expiration
     * REASON_LOCKED   - User is locked
     * 
*/ const REASON_BADLOGIN = 1; const REASON_FAILED = 2; const REASON_EXPIRED = 3; const REASON_LOGOUT = 4; const REASON_MESSAGE = 5; const REASON_SESSION = 6; const REASON_LOCKED = 7; /** * 64 characters that are valid for APRMD5 passwords. */ const APRMD5_VALID = './0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'; /** * Characters used when generating a password. */ const VOWELS = 'aeiouy'; const CONSONANTS = 'bcdfghjklmnpqrstvwxz'; const NUMBERS = '0123456789'; /** * Attempts to return a concrete Horde_Auth_Base instance based on * $driver. * * @deprecated * * @param string $driver Either a driver name, or the full class name to * use (class must extend Horde_Auth_Base). * @param array $params A hash containing any additional configuration * or parameters a subclass might need. * * @return Horde_Auth_Base The newly created concrete instance. * @throws Horde_Auth_Exception */ public static function factory($driver, $params = null) { /* Base drivers (in Auth/ directory). */ $class = __CLASS__ . '_' . Horde_String::ucfirst($driver); if (@class_exists($class)) { return new $class($params); } /* Explicit class name, */ $class = $driver; if (@class_exists($class)) { return new $class($params); } throw new Horde_Auth_Exception(__CLASS__ . ': Class definition of ' . $driver . ' not found.'); } /** * Formats a password using the current encryption. * * @param string $plaintext The plaintext password to encrypt. * @param string $salt The salt to use to encrypt the password. * If not present, a new salt will be * generated. * @param string $encryption The kind of pasword encryption to use. * Defaults to md5-hex. * @param boolean $show_encrypt Some password systems prepend the kind of * encryption to the crypted password ({SHA}, * etc). Defaults to false. * * @return string The encrypted password. */ public static function getCryptedPassword($plaintext, $salt = '', $encryption = 'md5-hex', $show_encrypt = false) { /* Get the salt to use. */ $salt = self::getSalt($encryption, $salt, $plaintext); /* Encrypt the password. */ switch ($encryption) { case 'aprmd5': $length = strlen($plaintext); $context = $plaintext . '$apr1$' . $salt; $binary = pack('H*', hash('md5', $plaintext . $salt . $plaintext)); for ($i = $length; $i > 0; $i -= 16) { $context .= substr($binary, 0, ($i > 16 ? 16 : $i)); } for ($i = $length; $i > 0; $i >>= 1) { $context .= ($i & 1) ? chr(0) : $plaintext[0]; } $binary = pack('H*', hash('md5', $context)); for ($i = 0; $i < 1000; ++$i) { $new = ($i & 1) ? $plaintext : substr($binary, 0, 16); if ($i % 3) { $new .= $salt; } if ($i % 7) { $new .= $plaintext; } $new .= ($i & 1) ? substr($binary, 0, 16) : $plaintext; $binary = pack('H*', hash('md5', $new)); } $p = array(); for ($i = 0; $i < 5; $i++) { $k = $i + 6; $j = $i + 12; if ($j == 16) { $j = 5; } $p[] = self::_toAPRMD5((ord($binary[$i]) << 16) | (ord($binary[$k]) << 8) | (ord($binary[$j])), 5); } return '$apr1$' . $salt . '$' . implode('', $p) . self::_toAPRMD5(ord($binary[11]), 3); case 'crypt': case 'crypt-des': case 'crypt-md5': case 'crypt-sha256': case 'crypt-sha512': case 'crypt-blowfish': return ($show_encrypt ? '{crypt}' : '') . crypt($plaintext, $salt); case 'joomla-md5': return md5($plaintext . $salt) . ':' . $salt; case 'md5-base64': $encrypted = base64_encode(pack('H*', hash('md5', $plaintext))); return $show_encrypt ? '{MD5}' . $encrypted : $encrypted; case 'msad': return Horde_String::convertCharset('"' . $plaintext . '"', 'ISO-8859-1', 'UTF-16LE'); case 'mysql': $encrypted = '*' . Horde_String::upper(sha1(sha1($plaintext, true), false)); return $show_encrypt ? '{MYSQL}' . $encrypted : $encrypted; case 'plain': return $plaintext; case 'sha': case 'sha1': $encrypted = base64_encode(pack('H*', hash('sha1', $plaintext))); return $show_encrypt ? '{SHA}' . $encrypted : $encrypted; case 'sha256': case 'ssha256': $encrypted = base64_encode(pack('H*', hash('sha256', $plaintext . $salt)) . $salt); return $show_encrypt ? '{SSHA256}' . $encrypted : $encrypted; case 'smd5': $encrypted = base64_encode(pack('H*', hash('md5', $plaintext . $salt)) . $salt); return $show_encrypt ? '{SMD5}' . $encrypted : $encrypted; case 'ssha': $encrypted = base64_encode(pack('H*', hash('sha1', $plaintext . $salt)) . $salt); return $show_encrypt ? '{SSHA}' . $encrypted : $encrypted; case 'md5-hex': default: return ($show_encrypt) ? '{MD5}' . hash('md5', $plaintext) : hash('md5', $plaintext); } } /** * Returns a salt for the appropriate kind of password encryption. * Optionally takes a seed and a plaintext password, to extract the seed * of an existing password, or for encryption types that use the plaintext * in the generation of the salt. * * @param string $encryption The kind of pasword encryption to use. * Defaults to md5-hex. * @param string $seed The seed to get the salt from (probably a * previously generated password). Defaults to * generating a new seed. * @param string $plaintext The plaintext password that we're generating * a salt for. Defaults to none. * * @return string The generated or extracted salt. */ public static function getSalt($encryption = 'md5-hex', $seed = '', $plaintext = '') { switch ($encryption) { case 'aprmd5': if ($seed) { return substr(preg_replace('/^\$apr1\$(.{8}).*/', '\\1', $seed), 0, 8); } else { $salt = ''; $valid = self::APRMD5_VALID; for ($i = 0; $i < 8; ++$i) { $salt .= $valid[mt_rand(0, 63)]; } return $salt; } case 'crypt': case 'crypt-des': return $seed ? substr(preg_replace('|^{crypt}|i', '', $seed), 0, 2) : substr(base64_encode(hash('md5', mt_rand(), true)), 0, 2); case 'crypt-blowfish': return $seed ? preg_replace('|^(?:{crypt})?(\$2.?\$(?:\d\d\$)?[0-9A-Za-z./]{22}).*|i', '$1', $seed) : '$2$' . substr(base64_encode(hash('md5', sprintf('%08X%08X%08X', mt_rand(), mt_rand(), mt_rand()), true)), 0, 21) . '$'; case 'crypt-md5': return $seed ? substr(preg_replace('|^{crypt}|i', '', $seed), 0, 12) : '$1$' . base64_encode(hash('md5', sprintf('%08X%08X', mt_rand(), mt_rand()), true)) . '$'; case 'crypt-sha256': return $seed ? substr(preg_replace('|^{crypt}|i', '', $seed), 0, strrpos($seed, '$')) : '$5$' . base64_encode(hash('md5', sprintf('%08X%08X%08X', mt_rand(), mt_rand(), mt_rand()), true)) . '$'; case 'crypt-sha512': return $seed ? substr(preg_replace('|^{crypt}|i', '', $seed), 0, strrpos($seed, '$')) : '$6$' . base64_encode(hash('md5', sprintf('%08X%08X%08X', mt_rand(), mt_rand(), mt_rand()), true)) . '$'; case 'joomla-md5': $split = preg_split('/:/', $seed ); return $split ? $split[1] : ''; case 'sha256': case 'ssha256': return $seed ? substr(base64_decode(preg_replace('|^{SSHA256}|i', '', $seed)), 32) : substr(pack('H*', hash('sha256', substr(pack('h*', hash('md5', mt_rand())), 0, 8) . $plaintext)), 0, 4); case 'smd5': return $seed ? substr(base64_decode(preg_replace('|^{SMD5}|i', '', $seed)), 16) : substr(pack('H*', hash('md5', substr(pack('h*', hash('md5', mt_rand())), 0, 8) . $plaintext)), 0, 4); case 'ssha': return $seed ? substr(base64_decode(preg_replace('|^{SSHA}|i', '', $seed)), 20) : substr(pack('H*', hash('sha1', substr(pack('h*', hash('md5', mt_rand())), 0, 8) . $plaintext)), 0, 4); default: return ''; } } /** * Converts to allowed 64 characters for APRMD5 passwords. * * @param string $value The value to convert * @param integer $count The number of iterations * * @return string $value converted to the 64 MD5 characters. */ protected static function _toAPRMD5($value, $count) { $aprmd5 = ''; $count = abs($count); $valid = self::APRMD5_VALID; while (--$count) { $aprmd5 .= $valid[$value & 0x3f]; $value >>= 6; } return $aprmd5; } /** * Generates a random, hopefully pronounceable, password. This can be used * when resetting automatically a user's password. * * @return string A random password */ public static function genRandomPassword() { /* Alternate consonant and vowel random chars with two random numbers * at the end. This should produce a fairly pronounceable password. */ return substr(self::CONSONANTS, mt_rand(0, strlen(self::CONSONANTS) - 1), 1) . substr(self::VOWELS, mt_rand(0, strlen(self::VOWELS) - 1), 1) . substr(self::CONSONANTS, mt_rand(0, strlen(self::CONSONANTS) - 1), 1) . substr(self::VOWELS, mt_rand(0, strlen(self::VOWELS) - 1), 1) . substr(self::CONSONANTS, mt_rand(0, strlen(self::CONSONANTS) - 1), 1) . substr(self::NUMBERS, mt_rand(0, strlen(self::NUMBERS) - 1), 1) . substr(self::NUMBERS, mt_rand(0, strlen(self::NUMBERS) - 1), 1); } /** * Checks whether a password matches some expected policy. * * @param string $password A password. * @param array $policy A configuration with policy rules. Supported * rules: * * - minLength: Minimum length of the password * - maxLength: Maximum length of the password * - maxSpace: Maximum number of white space characters * * The following are the types of characters required in a * password. Either specific characters, character classes, * or both can be required. Specific types are: * * - minUpper: Minimum number of uppercase characters * - minLower: Minimum number of lowercase characters * - minNumeric: Minimum number of numeric characters (0-9) * - minAlphaNum: Minimum number of alphanumeric characters * - minAlpha: Minimum number of alphabetic characters * - minSymbol: Minimum number of punctuation / symbol characters * - minNonAlpha: Minimum number of non-alphabetic characters * * Alternatively (or in addition to), the minimum number of * character classes can be configured by setting the * following. The valid range is 0 through 4 character * classes may be required for a password. The classes are: * 'upper', 'lower', 'number', and 'symbol'. For example: A * password of 'p@ssw0rd' satisfies three classes ('number', * 'lower', and 'symbol'), while 'passw0rd' only satisfies two * classes ('lower' and 'number'). * * - minClasses: Minimum number (0 through 4) of character * classes. * * @throws Horde_Auth_Exception if the password does not match the policy. */ public static function checkPasswordPolicy($password, array $policy) { // Check max/min lengths if specified in the policy. if (isset($policy['minLength']) && strlen($password) < $policy['minLength']) { throw new Horde_Auth_Exception(sprintf(Horde_Auth_Translation::t("The password must be at least %d characters long!"), $policy['minLength'])); } if (isset($policy['maxLength']) && strlen($password) > $policy['maxLength']) { throw new Horde_Auth_Exception(sprintf(Horde_Auth_Translation::t("The password is too long; passwords may not be more than %d characters long!"), $policy['maxLength'])); } // Dissect the password in a localized way. $classes = array(); $alpha = $nonalpha = $alnum = $num = $upper = $lower = $space = $symbol = 0; for ($i = 0; $i < strlen($password); $i++) { $char = substr($password, $i, 1); if (ctype_lower($char)) { $lower++; $alpha++; $alnum++; $classes['lower'] = 1; } elseif (ctype_upper($char)) { $upper++; $alpha++; $alnum++; $classes['upper'] = 1; } elseif (ctype_digit($char)) { $num++; $nonalpha++; $alnum++; $classes['number'] = 1; } elseif (ctype_punct($char)) { $symbol++; $nonalpha++; $classes['symbol'] = 1; } elseif (ctype_space($char)) { $space++; $classes['symbol'] = 1; } } // Check reamaining password policy options. if (isset($policy['minUpper']) && $policy['minUpper'] > $upper) { throw new Horde_Auth_Exception(sprintf(Horde_Auth_Translation::ngettext("The password must contain at least %d uppercase character.", "The password must contain at least %d uppercase characters.", $policy['minUpper']), $policy['minUpper'])); } if (isset($policy['minLower']) && $policy['minLower'] > $lower) { throw new Horde_Auth_Exception(sprintf(Horde_Auth_Translation::ngettext("The password must contain at least %d lowercase character.", "The password must contain at least %d lowercase characters.", $policy['minLower']), $policy['minLower'])); } if (isset($policy['minNumeric']) && $policy['minNumeric'] > $num) { throw new Horde_Auth_Exception(sprintf(Horde_Auth_Translation::ngettext("The password must contain at least %d numeric character.", "The password must contain at least %d numeric characters.", $policy['minNumeric']), $policy['minNumeric'])); } if (isset($policy['minAlpha']) && $policy['minAlpha'] > $alpha) { throw new Horde_Auth_Exception(sprintf(Horde_Auth_Translation::ngettext("The password must contain at least %d alphabetic character.", "The password must contain at least %d alphabetic characters.", $policy['minAlpha']), $policy['minAlpha'])); } if (isset($policy['minAlphaNum']) && $policy['minAlphaNum'] > $alnum) { throw new Horde_Auth_Exception(sprintf(Horde_Auth_Translation::ngettext("The password must contain at least %d alphanumeric character.", "The password must contain at least %d alphanumeric characters.", $policy['minAlphaNum']), $policy['minAlphaNum'])); } if (isset($policy['minNonAlpha']) && $policy['minNonAlpha'] > $nonalpha) { throw new Horde_Auth_Exception(sprintf(Horde_Auth_Translation::ngettext("The password must contain at least %d numeric or special character.", "The password must contain at least %d numeric or special characters.", $policy['minNonAlpha']), $policy['minNonAlpha'])); } if (isset($policy['minClasses']) && $policy['minClasses'] > array_sum($classes)) { throw new Horde_Auth_Exception(sprintf(Horde_Auth_Translation::t("The password must contain at least %d different types of characters. The types are: lower, upper, numeric, and symbols."), $policy['minClasses'])); } if (isset($policy['maxSpace']) && $policy['maxSpace'] < $space) { if ($policy['maxSpace'] > 0) { throw new Horde_Auth_Exception(sprintf(Horde_Auth_Translation::t("The password must contain less than %d whitespace characters."), $policy['maxSpace'] + 1)); } throw new Horde_Auth_Exception(Horde_Auth_Translation::t("The password must not contain whitespace characters.")); } if (isset($policy['minSymbol']) && $policy['minSymbol'] > $symbol) { throw new Horde_Auth_Exception(sprintf(Horde_Auth_Translation::ngettext("The password must contain at least %d symbol character.", "The password must contain at least %d symbol characters.", $policy['minSymbol']), $policy['minSymbol'])); } } /** * Checks whether a password is too similar to a dictionary of strings. * * @param string $password A password. * @param array $dict A dictionary to check for similarity, for * example the user name or an old password. * @param float $max The maximum allowed similarity in percent. * * @throws Horde_Auth_Exception if the password is too similar. */ public static function checkPasswordSimilarity($password, array $dict, $max = 80) { // Check for pass == dict, simple reverse strings, etc. foreach ($dict as $test) { if ((strcasecmp($password, $test) == 0) || (strcasecmp($password, strrev($test)) == 0)) { throw new Horde_Auth_Exception(Horde_Auth_Translation::t("The password is too simple to guess.")); } } // Check for percentages similarity also. This will catch very simple // Things like "password" -> "password2" or "xpasssword"... // Also, don't allow simple changing of capitalization to pass foreach ($dict as $test) { similar_text(Horde_String::lower($password), Horde_String::lower($test), $percent); if ($percent > $max) { throw new Horde_Auth_Exception(Horde_Auth_Translation::t("The password is too simple to guess.")); } } } } Horde_Auth-2.1.11/locale/da/LC_MESSAGES/Horde_Auth.mo0000664000175000017500000000623212653661601017722 0ustar janjanxLy$1x|wvrupvo=4$+Y(L5 0rOG  d O| w WD e 1 '4 \ |    The password is too long; passwords may not be more than %d characters long!The password is too simple to guess.The password must be at least %d characters long!The password must contain at least %d alphabetic character.The password must contain at least %d alphabetic characters.The password must contain at least %d alphanumeric character.The password must contain at least %d alphanumeric characters.The password must contain at least %d different types of characters. The types are: lower, upper, numeric, and symbols.The password must contain at least %d lowercase character.The password must contain at least %d lowercase characters.The password must contain at least %d numeric character.The password must contain at least %d numeric characters.The password must contain at least %d numeric or special character.The password must contain at least %d numeric or special characters.The password must contain at least %d symbol character.The password must contain at least %d symbol characters.The password must contain at least %d uppercase character.The password must contain at least %d uppercase characters.The password must contain less than %d whitespace characters.The password must not contain whitespace characters.Your account has been locked for %d minutesYour account has been permanently lockedProject-Id-Version: Horde_Auth Report-Msgid-Bugs-To: dev@lists.horde.org POT-Creation-Date: 2014-03-18 15:59+0100 PO-Revision-Date: 2014-03-19 20:32+0100 Last-Translator: Erling Preben Hansen Language-Team: i18n@lists.horde.org Language: da MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=2; plural=(n != 1); Kodeordet er for langt: Kodeord må ikke være mere end %d karakterer langt!Kodeordet er for nemt at gætte.Kodeordet skal være mindst %d karakterer langt!Kodeordet skal indeholde mindst %d alfabetisk karakter.Kodeordet skal indeholde mindst %d alfabetiske karakterer.Kodeordet skal indeholde mindst %d tal.Kodeordet skal indeholde mindst %d tal.Kodeordet skal indeholde mindst %d forskellige typer af karakter. Typerne er: Små bogstaver, store bogstaver, tal og symboler.Kodeordet skal indeholde mindst %d lille bogstav.Kodeordet skal indeholde mindst %d små bogstaver.Kodeordet skal indeholde mindst %d tal.Kodeordet skal indeholde mindst %d tal.Kodeordet skal indeholde mindst %d tal eller special karakter.Kodeordet skal indeholde mindst %d tal eller karakterer.Kodeordet skal indeholde mindst %d symbol.Kodeordet skal indeholde mindst %d symboler.Kodeordet skal indeholde mindst %d stort bogstav.Kodeordet skal indeholde mindst %d store bogstaver.Kodeordet skal indeholde mindre end %d mellemrum.Kodeordet må ikke indeholde mellemrum.Din konto er lås i %d minutterDin konto er permanent låst.Horde_Auth-2.1.11/locale/da/LC_MESSAGES/Horde_Auth.po0000664000175000017500000001021212653661601017716 0ustar janjan# Danish translations for Horde_Auth package. # Copyright (C) 2014 Horde LLC (http://www.horde.org/) # This file is distributed under the same license as the Horde_Auth package. # Erling Preben Hansen , 2013-2014. # msgid "" msgstr "" "Project-Id-Version: Horde_Auth\n" "Report-Msgid-Bugs-To: dev@lists.horde.org\n" "POT-Creation-Date: 2014-03-18 15:59+0100\n" "PO-Revision-Date: 2014-03-19 20:32+0100\n" "Last-Translator: Erling Preben Hansen \n" "Language-Team: i18n@lists.horde.org\n" "Language: da\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: lib/Horde/Auth.php:375 #, php-format msgid "" "The password is too long; passwords may not be more than %d characters long!" msgstr "" "Kodeordet er for langt: Kodeord må ikke være mere end %d karakterer langt!" #: lib/Horde/Auth.php:446 lib/Horde/Auth.php:456 msgid "The password is too simple to guess." msgstr "Kodeordet er for nemt at gætte." #: lib/Horde/Auth.php:371 #, php-format msgid "The password must be at least %d characters long!" msgstr "Kodeordet skal være mindst %d karakterer langt!" #: lib/Horde/Auth.php:407 #, php-format msgid "The password must contain at least %d alphabetic character." msgid_plural "The password must contain at least %d alphabetic characters." msgstr[0] "Kodeordet skal indeholde mindst %d alfabetisk karakter." msgstr[1] "Kodeordet skal indeholde mindst %d alfabetiske karakterer." #: lib/Horde/Auth.php:410 #, php-format msgid "The password must contain at least %d alphanumeric character." msgid_plural "The password must contain at least %d alphanumeric characters." msgstr[0] "Kodeordet skal indeholde mindst %d tal." msgstr[1] "Kodeordet skal indeholde mindst %d tal." #: lib/Horde/Auth.php:416 #, php-format msgid "" "The password must contain at least %d different types of characters. The " "types are: lower, upper, numeric, and symbols." msgstr "" "Kodeordet skal indeholde mindst %d forskellige typer af karakter. Typerne " "er: Små bogstaver, store bogstaver, tal og symboler." #: lib/Horde/Auth.php:401 #, php-format msgid "The password must contain at least %d lowercase character." msgid_plural "The password must contain at least %d lowercase characters." msgstr[0] "Kodeordet skal indeholde mindst %d lille bogstav." msgstr[1] "Kodeordet skal indeholde mindst %d små bogstaver." #: lib/Horde/Auth.php:404 #, php-format msgid "The password must contain at least %d numeric character." msgid_plural "The password must contain at least %d numeric characters." msgstr[0] "Kodeordet skal indeholde mindst %d tal." msgstr[1] "Kodeordet skal indeholde mindst %d tal." #: lib/Horde/Auth.php:413 #, php-format msgid "The password must contain at least %d numeric or special character." msgid_plural "" "The password must contain at least %d numeric or special characters." msgstr[0] "Kodeordet skal indeholde mindst %d tal eller special karakter." msgstr[1] "Kodeordet skal indeholde mindst %d tal eller karakterer." #: lib/Horde/Auth.php:425 #, php-format msgid "The password must contain at least %d symbol character." msgid_plural "The password must contain at least %d symbol characters." msgstr[0] "Kodeordet skal indeholde mindst %d symbol." msgstr[1] "Kodeordet skal indeholde mindst %d symboler." #: lib/Horde/Auth.php:398 #, php-format msgid "The password must contain at least %d uppercase character." msgid_plural "The password must contain at least %d uppercase characters." msgstr[0] "Kodeordet skal indeholde mindst %d stort bogstav." msgstr[1] "Kodeordet skal indeholde mindst %d store bogstaver." #: lib/Horde/Auth.php:420 #, php-format msgid "The password must contain less than %d whitespace characters." msgstr "Kodeordet skal indeholde mindre end %d mellemrum." #: lib/Horde/Auth.php:422 msgid "The password must not contain whitespace characters." msgstr "Kodeordet må ikke indeholde mellemrum." #: lib/Horde/Auth/Base.php:156 #, php-format msgid "Your account has been locked for %d minutes" msgstr "Din konto er lås i %d minutter" #: lib/Horde/Auth/Base.php:154 msgid "Your account has been permanently locked" msgstr "Din konto er permanent låst." Horde_Auth-2.1.11/locale/de/LC_MESSAGES/Horde_Auth.mo0000664000175000017500000000645512653661601017735 0ustar janjanxLy$1x|wvrupvo=4$+Y(N/&~2kD uS a z+ d u : . (     The password is too long; passwords may not be more than %d characters long!The password is too simple to guess.The password must be at least %d characters long!The password must contain at least %d alphabetic character.The password must contain at least %d alphabetic characters.The password must contain at least %d alphanumeric character.The password must contain at least %d alphanumeric characters.The password must contain at least %d different types of characters. The types are: lower, upper, numeric, and symbols.The password must contain at least %d lowercase character.The password must contain at least %d lowercase characters.The password must contain at least %d numeric character.The password must contain at least %d numeric characters.The password must contain at least %d numeric or special character.The password must contain at least %d numeric or special characters.The password must contain at least %d symbol character.The password must contain at least %d symbol characters.The password must contain at least %d uppercase character.The password must contain at least %d uppercase characters.The password must contain less than %d whitespace characters.The password must not contain whitespace characters.Your account has been locked for %d minutesYour account has been permanently lockedProject-Id-Version: Horde_Auth Report-Msgid-Bugs-To: dev@lists.horde.org POT-Creation-Date: 2014-03-25 18:08+0100 PO-Revision-Date: 2013-06-04 11:59+0200 Last-Translator: Jan Schneider Language-Team: i18n@lists.horde.org Language: de MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=2; plural=(n != 1); Das Passwort ist zu lang, das Passwort darf nicht länger als %d Zeichen sein!Das Passwort ist zu leicht zu erraten.Das Passwort muss mindestens %d Zeichen lang sein!Das Passwort muss mindestens %d Buchstaben enthalten.Das Passwort muss mindestens %d Buchstaben enthalten.Das Passwort muss mindestens %d Buchstaben oder Zahl enthalten.Das Passwort muss mindestens %d Buchstaben oder Zahlen enthalten.Das Passwort muss mindestens %d verschiedenen Zeichentypen enhalten. Typen sind: Kleinbuchstaben, Großbuchstaben, Zahlen und Sonderzeichen.Das Passwort muss mindestens %d Kleinbuchstaben enthalten.Das Passwort muss mindestens %d Kleinbuchstaben enthalten.Das Passwort muss mindestens %d Zahl enthalten.Das Passwort muss mindestens %d Zahlen enthalten.Das Passwort muss mindestens %d Zahl oder Symbol enthalten.Das Passwort muss mindestens %d Zahlen oder Symbole enthalten.Das Passwort muss mindestens %d Symbol enthalten.Das Passwort muss mindestens %d Symbole enthalten.Das Passwort muss mindestens %d Großbuchstaben enthalten.Das Passwort muss mindestens %d Großbuchstaben enthalten.Das Passwort darf nicht mehr als %d Leerzeichen enthalten.Das Passwort darf keine Leerzeichen enthalten.Ihr Konto wurde für %d Minuten gesperrtIhr Konto wurde gesperrtHorde_Auth-2.1.11/locale/de/LC_MESSAGES/Horde_Auth.po0000664000175000017500000001042712653661601017732 0ustar janjan# German translations for Horde_Auth package. # Copyright 2011-2016 Horde LLC (http://www.horde.org/) # This file is distributed under the same license as the Horde_Auth package. # Jan Schneider , 2011-2014. # msgid "" msgstr "" "Project-Id-Version: Horde_Auth \n" "Report-Msgid-Bugs-To: dev@lists.horde.org\n" "POT-Creation-Date: 2014-03-25 18:08+0100\n" "PO-Revision-Date: 2013-06-04 11:59+0200\n" "Last-Translator: Jan Schneider \n" "Language-Team: i18n@lists.horde.org\n" "Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: lib/Horde/Auth.php:375 #, php-format msgid "" "The password is too long; passwords may not be more than %d characters long!" msgstr "" "Das Passwort ist zu lang, das Passwort darf nicht länger als %d Zeichen sein!" #: lib/Horde/Auth.php:446 lib/Horde/Auth.php:456 msgid "The password is too simple to guess." msgstr "Das Passwort ist zu leicht zu erraten." #: lib/Horde/Auth.php:371 #, php-format msgid "The password must be at least %d characters long!" msgstr "Das Passwort muss mindestens %d Zeichen lang sein!" #: lib/Horde/Auth.php:407 #, php-format msgid "The password must contain at least %d alphabetic character." msgid_plural "The password must contain at least %d alphabetic characters." msgstr[0] "Das Passwort muss mindestens %d Buchstaben enthalten." msgstr[1] "Das Passwort muss mindestens %d Buchstaben enthalten." #: lib/Horde/Auth.php:410 #, php-format msgid "The password must contain at least %d alphanumeric character." msgid_plural "The password must contain at least %d alphanumeric characters." msgstr[0] "Das Passwort muss mindestens %d Buchstaben oder Zahl enthalten." msgstr[1] "Das Passwort muss mindestens %d Buchstaben oder Zahlen enthalten." #: lib/Horde/Auth.php:416 #, php-format msgid "" "The password must contain at least %d different types of characters. The " "types are: lower, upper, numeric, and symbols." msgstr "" "Das Passwort muss mindestens %d verschiedenen Zeichentypen enhalten. Typen " "sind: Kleinbuchstaben, Großbuchstaben, Zahlen und Sonderzeichen." #: lib/Horde/Auth.php:401 #, php-format msgid "The password must contain at least %d lowercase character." msgid_plural "The password must contain at least %d lowercase characters." msgstr[0] "Das Passwort muss mindestens %d Kleinbuchstaben enthalten." msgstr[1] "Das Passwort muss mindestens %d Kleinbuchstaben enthalten." #: lib/Horde/Auth.php:404 #, php-format msgid "The password must contain at least %d numeric character." msgid_plural "The password must contain at least %d numeric characters." msgstr[0] "Das Passwort muss mindestens %d Zahl enthalten." msgstr[1] "Das Passwort muss mindestens %d Zahlen enthalten." #: lib/Horde/Auth.php:413 #, php-format msgid "The password must contain at least %d numeric or special character." msgid_plural "" "The password must contain at least %d numeric or special characters." msgstr[0] "Das Passwort muss mindestens %d Zahl oder Symbol enthalten." msgstr[1] "Das Passwort muss mindestens %d Zahlen oder Symbole enthalten." #: lib/Horde/Auth.php:425 #, php-format msgid "The password must contain at least %d symbol character." msgid_plural "The password must contain at least %d symbol characters." msgstr[0] "Das Passwort muss mindestens %d Symbol enthalten." msgstr[1] "Das Passwort muss mindestens %d Symbole enthalten." #: lib/Horde/Auth.php:398 #, php-format msgid "The password must contain at least %d uppercase character." msgid_plural "The password must contain at least %d uppercase characters." msgstr[0] "Das Passwort muss mindestens %d Großbuchstaben enthalten." msgstr[1] "Das Passwort muss mindestens %d Großbuchstaben enthalten." #: lib/Horde/Auth.php:420 #, php-format msgid "The password must contain less than %d whitespace characters." msgstr "Das Passwort darf nicht mehr als %d Leerzeichen enthalten." #: lib/Horde/Auth.php:422 msgid "The password must not contain whitespace characters." msgstr "Das Passwort darf keine Leerzeichen enthalten." #: lib/Horde/Auth/Base.php:156 #, php-format msgid "Your account has been locked for %d minutes" msgstr "Ihr Konto wurde für %d Minuten gesperrt" #: lib/Horde/Auth/Base.php:154 msgid "Your account has been permanently locked" msgstr "Ihr Konto wurde gesperrt" Horde_Auth-2.1.11/locale/es/LC_MESSAGES/Horde_Auth.mo0000664000175000017500000000711312653661601017744 0ustar janjanxLy$1x|wvrupvo=4$+Y([W/8 , L k Dy 1 , -   The password is too long; passwords may not be more than %d characters long!The password is too simple to guess.The password must be at least %d characters long!The password must contain at least %d alphabetic character.The password must contain at least %d alphabetic characters.The password must contain at least %d alphanumeric character.The password must contain at least %d alphanumeric characters.The password must contain at least %d different types of characters. The types are: lower, upper, numeric, and symbols.The password must contain at least %d lowercase character.The password must contain at least %d lowercase characters.The password must contain at least %d numeric character.The password must contain at least %d numeric characters.The password must contain at least %d numeric or special character.The password must contain at least %d numeric or special characters.The password must contain at least %d symbol character.The password must contain at least %d symbol characters.The password must contain at least %d uppercase character.The password must contain at least %d uppercase characters.The password must contain less than %d whitespace characters.The password must not contain whitespace characters.Your account has been locked for %d minutesYour account has been permanently lockedProject-Id-Version: Horde_Auth Report-Msgid-Bugs-To: dev@lists.horde.org POT-Creation-Date: 2013-06-04 11:48+0200 PO-Revision-Date: 2013-06-11 20:26+0200 Last-Translator: Manuel P. Ayala , Juan C. Blanco Language-Team: i18n@lists.horde.org Language: es MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=2; plural=(n != 1); La contraseña es demasiado larga; ¡las contraseñas no deben tener más de %d caracteres!La contraseña es demasiado simple de adivinar.¡La contraseña tiene que tener al menos %d caracteres!La contraseña tiene que tener al menos %d carácter alfabético.La contraseña tiene que tener al menos %d caracteres alfabéticos.La contraseña tiene que tener al menos %d carácter alfanumérico.La contraseña tiene que tener al menos %d caracteres alfanuméricos.La contraseña tiene que tener al menos %d tipos de caracteres distintos. Los tipos son: minúsculas, mayúsculas, números y signos de puntuación.La contraseña tiene que tener al menos %d carácter en minúsculas.La contraseña tiene que tener al menos %d caracteres en minúsculas.La contraseña tiene que tener al menos %d carácter numérico.La contraseña tiene que tener al menos %d caracteres en numéricos.La contraseña tiene que tener al menos %d carácter numérico o especial.La contraseña tiene que tener al menos %d caracteres numéricos o especiales.La contraseña tiene que tener al menos %d signo de puntuación.La contraseña tiene que tener al menos %d signos de puntuación.La contraseña tiene que tener al menos %d carácter en mayúsculas.La contraseña tiene que tener al menos %d caracteres en mayúsculas.La nueva contraseña tiene que tener menos de %d espacios en blanco.La contraseña no puede tener espacios en blanco.Su cuenta se ha bloqueado durante %d minutosSu cuenta se ha bloqueado de forma permanenteHorde_Auth-2.1.11/locale/es/LC_MESSAGES/Horde_Auth.po0000664000175000017500000001106612653661601017751 0ustar janjan# Spanish translations for Horde_Auth package. # Copyright (C) 2013 Horde LLC (http://www.horde.org/) # This file is distributed under the same license as the Horde_Auth package. # Automatically generated, 2013. # msgid "" msgstr "" "Project-Id-Version: Horde_Auth \n" "Report-Msgid-Bugs-To: dev@lists.horde.org\n" "POT-Creation-Date: 2013-06-04 11:48+0200\n" "PO-Revision-Date: 2013-06-11 20:26+0200\n" "Last-Translator: Manuel P. Ayala , Juan C. Blanco " "\n" "Language-Team: i18n@lists.horde.org\n" "Language: es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: lib/Horde/Auth.php:362 #, php-format msgid "" "The password is too long; passwords may not be more than %d characters long!" msgstr "" "La contraseña es demasiado larga; ¡las contraseñas no deben tener más de %d " "caracteres!" #: lib/Horde/Auth.php:433 lib/Horde/Auth.php:442 msgid "The password is too simple to guess." msgstr "La contraseña es demasiado simple de adivinar." #: lib/Horde/Auth.php:358 #, php-format msgid "The password must be at least %d characters long!" msgstr "¡La contraseña tiene que tener al menos %d caracteres!" #: lib/Horde/Auth.php:394 #, php-format msgid "The password must contain at least %d alphabetic character." msgid_plural "The password must contain at least %d alphabetic characters." msgstr[0] "La contraseña tiene que tener al menos %d carácter alfabético." msgstr[1] "La contraseña tiene que tener al menos %d caracteres alfabéticos." #: lib/Horde/Auth.php:397 #, php-format msgid "The password must contain at least %d alphanumeric character." msgid_plural "The password must contain at least %d alphanumeric characters." msgstr[0] "La contraseña tiene que tener al menos %d carácter alfanumérico." msgstr[1] "La contraseña tiene que tener al menos %d caracteres alfanuméricos." #: lib/Horde/Auth.php:403 #, php-format msgid "" "The password must contain at least %d different types of characters. The " "types are: lower, upper, numeric, and symbols." msgstr "" "La contraseña tiene que tener al menos %d tipos de caracteres distintos. Los " "tipos son: minúsculas, mayúsculas, números y signos de puntuación." #: lib/Horde/Auth.php:388 #, php-format msgid "The password must contain at least %d lowercase character." msgid_plural "The password must contain at least %d lowercase characters." msgstr[0] "La contraseña tiene que tener al menos %d carácter en minúsculas." msgstr[1] "La contraseña tiene que tener al menos %d caracteres en minúsculas." #: lib/Horde/Auth.php:391 #, php-format msgid "The password must contain at least %d numeric character." msgid_plural "The password must contain at least %d numeric characters." msgstr[0] "La contraseña tiene que tener al menos %d carácter numérico." msgstr[1] "La contraseña tiene que tener al menos %d caracteres en numéricos." #: lib/Horde/Auth.php:400 #, php-format msgid "The password must contain at least %d numeric or special character." msgid_plural "" "The password must contain at least %d numeric or special characters." msgstr[0] "" "La contraseña tiene que tener al menos %d carácter numérico o especial." msgstr[1] "" "La contraseña tiene que tener al menos %d caracteres numéricos o especiales." #: lib/Horde/Auth.php:412 #, php-format msgid "The password must contain at least %d symbol character." msgid_plural "The password must contain at least %d symbol characters." msgstr[0] "La contraseña tiene que tener al menos %d signo de puntuación." msgstr[1] "La contraseña tiene que tener al menos %d signos de puntuación." #: lib/Horde/Auth.php:385 #, php-format msgid "The password must contain at least %d uppercase character." msgid_plural "The password must contain at least %d uppercase characters." msgstr[0] "La contraseña tiene que tener al menos %d carácter en mayúsculas." msgstr[1] "La contraseña tiene que tener al menos %d caracteres en mayúsculas." #: lib/Horde/Auth.php:407 #, php-format msgid "The password must contain less than %d whitespace characters." msgstr "La nueva contraseña tiene que tener menos de %d espacios en blanco." #: lib/Horde/Auth.php:409 msgid "The password must not contain whitespace characters." msgstr "La contraseña no puede tener espacios en blanco." #: lib/Horde/Auth/Base.php:156 #, php-format msgid "Your account has been locked for %d minutes" msgstr "Su cuenta se ha bloqueado durante %d minutos" #: lib/Horde/Auth/Base.php:154 msgid "Your account has been permanently locked" msgstr "Su cuenta se ha bloqueado de forma permanente" Horde_Auth-2.1.11/locale/et/LC_MESSAGES/Horde_Auth.mo0000664000175000017500000000533612653661601017752 0ustar janjan 0L1$~1x|NwvCrp-v=4SD*M.x[usym][ a g 3 &    The password is too long; passwords may not be more than %d characters long!The password is too simple to guess.The password must be at least %d characters long!The password must contain at least %d alphabetic character.The password must contain at least %d alphabetic characters.The password must contain at least %d alphanumeric character.The password must contain at least %d alphanumeric characters.The password must contain at least %d different types of characters. The types are: lower, upper, numeric, and symbols.The password must contain at least %d lowercase character.The password must contain at least %d lowercase characters.The password must contain at least %d numeric character.The password must contain at least %d numeric characters.The password must contain at least %d symbol character.The password must contain at least %d symbol characters.The password must contain at least %d uppercase character.The password must contain at least %d uppercase characters.The password must contain less than %d whitespace characters.The password must not contain whitespace characters.Project-Id-Version: Horde_Auth Report-Msgid-Bugs-To: dev@lists.horde.org POT-Creation-Date: 2011-10-19 13:56+0300 PO-Revision-Date: 2011-11-09 13:56+0300 Last-Translator: Alar Sing Language-Team: i18n@lists.horde.org Language: et MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=2; plural=(n != 1); Salasõna on liiga pikk; salasõna ei või olla pikem kui %d tähte!Salasõna on liiga lihtsasti ära arvatav.Salasõna peab olema vähemalt %d märki pikk!Salasõna peab sisaldama vähemalt %d tähte.Salasõna peab sisaldama vähemalt %d tähte.Salasõna peab sisaldama vähemalt %d numbrit või tähte.Salasõna peab sisaldama vähemalt %d numbrit või tähte.Salasõna peab vähemalt sisaldama %d eritüüpi märke.Need on: väiksed ja suured tähed, numbrid ning sümbolid.Salasõna peab sisaldama vähemalt %d väikest tähte.Salasõna peab sisaldama vähemalt %d väikest tähte.Salasõna peab sisaldama vähemalt %d numbrit.Salasõna peab sisaldama vähemalt %d numbrit.Salasõna peab sisaldama vähemalt %d sümbolit.Salasõna peab sisaldama vähemalt %d sümbplit.Salasõna peab sisaldama vähemalt %d suurt tähte.Salasõna peab sisaldama vähemalt %d suurt tähte.Salasõna ei või sisaldada rohkem kui %d tühikut.Salasõna ei või sisaldada tühikuid.Horde_Auth-2.1.11/locale/et/LC_MESSAGES/Horde_Auth.po0000664000175000017500000000707112653661601017753 0ustar janjan# Estonian translations for Horde_Auth package. # Copyright 2011-2016 Horde LLC (http://www.horde.org/) # This file is distributed under the same license as the Horde_Auth package. # Automatically generated, 2011. # msgid "" msgstr "" "Project-Id-Version: Horde_Auth \n" "Report-Msgid-Bugs-To: dev@lists.horde.org\n" "POT-Creation-Date: 2011-10-19 13:56+0300\n" "PO-Revision-Date: 2011-11-09 13:56+0300\n" "Last-Translator: Alar Sing \n" "Language-Team: i18n@lists.horde.org\n" "Language: et\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: lib/Horde/Auth.php:355 #, php-format msgid "" "The password is too long; passwords may not be more than %d characters long!" msgstr "Salasõna on liiga pikk; salasõna ei või olla pikem kui %d tähte!" #: lib/Horde/Auth.php:425 lib/Horde/Auth.php:434 msgid "The password is too simple to guess." msgstr "Salasõna on liiga lihtsasti ära arvatav." #: lib/Horde/Auth.php:351 #, php-format msgid "The password must be at least %d characters long!" msgstr "Salasõna peab olema vähemalt %d märki pikk!" #: lib/Horde/Auth.php:387 #, php-format msgid "The password must contain at least %d alphabetic character." msgid_plural "The password must contain at least %d alphabetic characters." msgstr[0] "Salasõna peab sisaldama vähemalt %d tähte." msgstr[1] "Salasõna peab sisaldama vähemalt %d tähte." #: lib/Horde/Auth.php:390 #, php-format msgid "The password must contain at least %d alphanumeric character." msgid_plural "The password must contain at least %d alphanumeric characters." msgstr[0] "Salasõna peab sisaldama vähemalt %d numbrit või tähte." msgstr[1] "Salasõna peab sisaldama vähemalt %d numbrit või tähte." #: lib/Horde/Auth.php:393 #, php-format msgid "" "The password must contain at least %d different types of characters. The " "types are: lower, upper, numeric, and symbols." msgstr "" "Salasõna peab vähemalt sisaldama %d eritüüpi märke.Need on: väiksed ja " "suured tähed, numbrid ning sümbolid." #: lib/Horde/Auth.php:381 #, php-format msgid "The password must contain at least %d lowercase character." msgid_plural "The password must contain at least %d lowercase characters." msgstr[0] "Salasõna peab sisaldama vähemalt %d väikest tähte." msgstr[1] "Salasõna peab sisaldama vähemalt %d väikest tähte." #: lib/Horde/Auth.php:384 #, php-format msgid "The password must contain at least %d numeric character." msgid_plural "The password must contain at least %d numeric characters." msgstr[0] "Salasõna peab sisaldama vähemalt %d numbrit." msgstr[1] "Salasõna peab sisaldama vähemalt %d numbrit." #: lib/Horde/Auth.php:402 #, php-format msgid "The password must contain at least %d symbol character." msgid_plural "The password must contain at least %d symbol characters." msgstr[0] "Salasõna peab sisaldama vähemalt %d sümbolit." msgstr[1] "Salasõna peab sisaldama vähemalt %d sümbplit." #: lib/Horde/Auth.php:378 #, php-format msgid "The password must contain at least %d uppercase character." msgid_plural "The password must contain at least %d uppercase characters." msgstr[0] "Salasõna peab sisaldama vähemalt %d suurt tähte." msgstr[1] "Salasõna peab sisaldama vähemalt %d suurt tähte." #: lib/Horde/Auth.php:397 #, php-format msgid "The password must contain less than %d whitespace characters." msgstr "Salasõna ei või sisaldada rohkem kui %d tühikut." #: lib/Horde/Auth.php:399 msgid "The password must not contain whitespace characters." msgstr "Salasõna ei või sisaldada tühikuid." Horde_Auth-2.1.11/locale/eu/LC_MESSAGES/Horde_Auth.mo0000664000175000017500000000136112653661601017745 0ustar janjan<\p$q+(3The password is too simple to guess.Your account has been locked for %d minutesYour account has been permanently lockedProject-Id-Version: Horde_Auth Report-Msgid-Bugs-To: dev@lists.horde.org POT-Creation-Date: 2012-11-06 16:40+0100 PO-Revision-Date: 2013-01-16 09:25+0100 Last-Translator: Ibon Igartua Language-Team: i18n@lists.horde.org Language: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=2; plural=(n != 1); X-Poedit-Language: Basque Pasahitza errazegia da.Saio-hasiera blokeatu egin da datozen %d minutuetanZure kontua blokeatu egin daHorde_Auth-2.1.11/locale/eu/LC_MESSAGES/Horde_Auth.po0000664000175000017500000000567312653661601017762 0ustar janjan# Basque translations for Horde_Auth package. # Copyright 2012-2016 Horde LLC (http://www.horde.org/) # This file is distributed under the same license as the Horde_Auth package. # Automatically generated, 2012. # msgid "" msgstr "" "Project-Id-Version: Horde_Auth\n" "Report-Msgid-Bugs-To: dev@lists.horde.org\n" "POT-Creation-Date: 2012-11-06 16:40+0100\n" "PO-Revision-Date: 2013-01-16 09:25+0100\n" "Last-Translator: Ibon Igartua \n" "Language-Team: i18n@lists.horde.org\n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Poedit-Language: Basque\n" #: lib/Horde/Auth.php:353 #, php-format msgid "" "The password is too long; passwords may not be more than %d characters long!" msgstr "" #: lib/Horde/Auth.php:421 lib/Horde/Auth.php:430 msgid "The password is too simple to guess." msgstr "Pasahitza errazegia da." #: lib/Horde/Auth.php:349 #, php-format msgid "The password must be at least %d characters long!" msgstr "" #: lib/Horde/Auth.php:385 #, php-format msgid "The password must contain at least %d alphabetic character." msgid_plural "The password must contain at least %d alphabetic characters." msgstr[0] "" msgstr[1] "" #: lib/Horde/Auth.php:388 #, php-format msgid "The password must contain at least %d alphanumeric character." msgid_plural "The password must contain at least %d alphanumeric characters." msgstr[0] "" msgstr[1] "" #: lib/Horde/Auth.php:391 #, php-format msgid "" "The password must contain at least %d different types of characters. The " "types are: lower, upper, numeric, and symbols." msgstr "" #: lib/Horde/Auth.php:379 #, php-format msgid "The password must contain at least %d lowercase character." msgid_plural "The password must contain at least %d lowercase characters." msgstr[0] "" msgstr[1] "" #: lib/Horde/Auth.php:382 #, php-format msgid "The password must contain at least %d numeric character." msgid_plural "The password must contain at least %d numeric characters." msgstr[0] "" msgstr[1] "" #: lib/Horde/Auth.php:400 #, php-format msgid "The password must contain at least %d symbol character." msgid_plural "The password must contain at least %d symbol characters." msgstr[0] "" msgstr[1] "" #: lib/Horde/Auth.php:376 #, php-format msgid "The password must contain at least %d uppercase character." msgid_plural "The password must contain at least %d uppercase characters." msgstr[0] "" msgstr[1] "" #: lib/Horde/Auth.php:395 #, php-format msgid "The password must contain less than %d whitespace characters." msgstr "" #: lib/Horde/Auth.php:397 msgid "The password must not contain whitespace characters." msgstr "" #: lib/Horde/Auth/Base.php:148 #, php-format msgid "Your account has been locked for %d minutes" msgstr "Saio-hasiera blokeatu egin da datozen %d minutuetan" #: lib/Horde/Auth/Base.php:146 msgid "Your account has been permanently locked" msgstr "Zure kontua blokeatu egin da" Horde_Auth-2.1.11/locale/fi/LC_MESSAGES/Horde_Auth.mo0000664000175000017500000000614712653661601017741 0ustar janjan hLi$1x |wv{rpev=M4+(M.6Tyr s b` d n( R ? * J   The password is too long; passwords may not be more than %d characters long!The password is too simple to guess.The password must be at least %d characters long!The password must contain at least %d alphabetic character.The password must contain at least %d alphabetic characters.The password must contain at least %d alphanumeric character.The password must contain at least %d alphanumeric characters.The password must contain at least %d different types of characters. The types are: lower, upper, numeric, and symbols.The password must contain at least %d lowercase character.The password must contain at least %d lowercase characters.The password must contain at least %d numeric character.The password must contain at least %d numeric characters.The password must contain at least %d symbol character.The password must contain at least %d symbol characters.The password must contain at least %d uppercase character.The password must contain at least %d uppercase characters.The password must contain less than %d whitespace characters.The password must not contain whitespace characters.Your account has been locked for %d minutesYour account has been permanently lockedProject-Id-Version: Horde_Auth Report-Msgid-Bugs-To: dev@lists.horde.org POT-Creation-Date: 2012-11-06 16:40+0100 PO-Revision-Date: 2012-10-28 20:37:39+0200 Last-Translator: Leena Heino Language-Team: Finnish Language: fi MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=2; plural=(n != 1); Salasana on liian pitkä; salasanat eivät saa olla kuin %d merkkiä pitkiä!Salasana on liian arvattava ja yksinkertainen.Salasana pitää olla vähintään %d merkkiä pitkä!Salasanan pitää sisältää ainakin %d muu kuin aakkosmerkki.Salasanan pitää sisältää ainakin %d muuta kuin aakkosmerkkiä.Salasanan pitää sisältää ainakin %d muu kuin aakkosnumeerinen merkki.Salasanan pitää sisältää ainakin %d muuta kuin aakkosnumeerista merkkiä.Salasanan pitää sisältää ainakin %d eri tyyppistä merkkiä. Merkkityypit ovat: pieni, suuri, numeerinen ja symboli.Salasanan pitää sisältää ainakin %d pieni kirjain.Salasanan pitää sisältää ainakin %d pientä kirjainta.Salasanan pitää sisältää ainakin %d numero.Salasanan pitää sisältää ainakin %d numeroa.Salasanan pitää sisältää ainakin %d symboli.Salasanan pitää sisältää ainakin %d symbolia.Salasanan pitää sisältää ainakin %d iso kirjain.Salasanan pitää sisältää ainakin %d isoa kirjainta.Salasanan pitää sisältää vähemmän kuin %d välilyöntiä tai tabulaattoria.Salasana ei saa sisältää välilyöntejä tai tabulaattoreitaTilisi on lukittu %d minuutiksiTilisi on pysyvästi lukittuHorde_Auth-2.1.11/locale/fi/LC_MESSAGES/Horde_Auth.po0000664000175000017500000001001012653661601017724 0ustar janjan# Finnish translations for Horde_Auth package. # Copyright 2012-2016 Horde LLC (http://www.horde.org/) # This file is distributed under the same license as the Horde_Auth package. # Leena Heino , 2012. # msgid "" msgstr "" "Project-Id-Version: Horde_Auth \n" "Report-Msgid-Bugs-To: dev@lists.horde.org\n" "POT-Creation-Date: 2012-11-06 16:40+0100\n" "PO-Revision-Date: 2012-10-28 20:37:39+0200\n" "Last-Translator: Leena Heino \n" "Language-Team: Finnish \n" "Language: fi\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: lib/Horde/Auth.php:353 #, php-format msgid "" "The password is too long; passwords may not be more than %d characters long!" msgstr "" "Salasana on liian pitkä; salasanat eivät saa olla kuin %d merkkiä pitkiä!" #: lib/Horde/Auth.php:421 lib/Horde/Auth.php:430 msgid "The password is too simple to guess." msgstr "Salasana on liian arvattava ja yksinkertainen." #: lib/Horde/Auth.php:349 #, php-format msgid "The password must be at least %d characters long!" msgstr "Salasana pitää olla vähintään %d merkkiä pitkä!" #: lib/Horde/Auth.php:385 #, php-format msgid "The password must contain at least %d alphabetic character." msgid_plural "The password must contain at least %d alphabetic characters." msgstr[0] "Salasanan pitää sisältää ainakin %d muu kuin aakkosmerkki." msgstr[1] "Salasanan pitää sisältää ainakin %d muuta kuin aakkosmerkkiä." #: lib/Horde/Auth.php:388 #, php-format msgid "The password must contain at least %d alphanumeric character." msgid_plural "The password must contain at least %d alphanumeric characters." msgstr[0] "" "Salasanan pitää sisältää ainakin %d muu kuin aakkosnumeerinen merkki." msgstr[1] "" "Salasanan pitää sisältää ainakin %d muuta kuin aakkosnumeerista merkkiä." #: lib/Horde/Auth.php:391 #, php-format msgid "" "The password must contain at least %d different types of characters. The " "types are: lower, upper, numeric, and symbols." msgstr "" "Salasanan pitää sisältää ainakin %d eri tyyppistä merkkiä. Merkkityypit " "ovat: pieni, suuri, numeerinen ja symboli." #: lib/Horde/Auth.php:379 #, php-format msgid "The password must contain at least %d lowercase character." msgid_plural "The password must contain at least %d lowercase characters." msgstr[0] "Salasanan pitää sisältää ainakin %d pieni kirjain." msgstr[1] "Salasanan pitää sisältää ainakin %d pientä kirjainta." #: lib/Horde/Auth.php:382 #, php-format msgid "The password must contain at least %d numeric character." msgid_plural "The password must contain at least %d numeric characters." msgstr[0] "Salasanan pitää sisältää ainakin %d numero." msgstr[1] "Salasanan pitää sisältää ainakin %d numeroa." #: lib/Horde/Auth.php:400 #, php-format msgid "The password must contain at least %d symbol character." msgid_plural "The password must contain at least %d symbol characters." msgstr[0] "Salasanan pitää sisältää ainakin %d symboli." msgstr[1] "Salasanan pitää sisältää ainakin %d symbolia." #: lib/Horde/Auth.php:376 #, php-format msgid "The password must contain at least %d uppercase character." msgid_plural "The password must contain at least %d uppercase characters." msgstr[0] "Salasanan pitää sisältää ainakin %d iso kirjain." msgstr[1] "Salasanan pitää sisältää ainakin %d isoa kirjainta." #: lib/Horde/Auth.php:395 #, php-format msgid "The password must contain less than %d whitespace characters." msgstr "" "Salasanan pitää sisältää vähemmän kuin %d välilyöntiä tai tabulaattoria." #: lib/Horde/Auth.php:397 msgid "The password must not contain whitespace characters." msgstr "Salasana ei saa sisältää välilyöntejä tai tabulaattoreita" #: lib/Horde/Auth/Base.php:148 #, php-format msgid "Your account has been locked for %d minutes" msgstr "Tilisi on lukittu %d minuutiksi" #: lib/Horde/Auth/Base.php:146 msgid "Your account has been permanently locked" msgstr "Tilisi on pysyvästi lukittu" Horde_Auth-2.1.11/locale/fr/LC_MESSAGES/Horde_Auth.mo0000664000175000017500000000662112653661601017747 0ustar janjan hLi$1x |wv{rpev=M4+(g+>@jF x  / : : +4 0`   The password is too long; passwords may not be more than %d characters long!The password is too simple to guess.The password must be at least %d characters long!The password must contain at least %d alphabetic character.The password must contain at least %d alphabetic characters.The password must contain at least %d alphanumeric character.The password must contain at least %d alphanumeric characters.The password must contain at least %d different types of characters. The types are: lower, upper, numeric, and symbols.The password must contain at least %d lowercase character.The password must contain at least %d lowercase characters.The password must contain at least %d numeric character.The password must contain at least %d numeric characters.The password must contain at least %d symbol character.The password must contain at least %d symbol characters.The password must contain at least %d uppercase character.The password must contain at least %d uppercase characters.The password must contain less than %d whitespace characters.The password must not contain whitespace characters.Your account has been locked for %d minutesYour account has been permanently lockedProject-Id-Version: Horde_Auth Report-Msgid-Bugs-To: dev@lists.horde.org POT-Creation-Date: 2012-11-06 16:40+0100 PO-Revision-Date: 2013-01-14 10:11+0100 Last-Translator: Paul De Vlieger Language-Team: French Language: fr MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=2; plural=(n > 1); X-Generator: Lokalize 1.4 Votre nouveau mot de passe est trop long ; un mot de passe ne peut posséder plus de %d caractères !Votre nouveau mot de passe est trop simple.Votre nouveau mot de passe doit avoir au moins %d caractères !Votre nouveau mot de passe doit avoir au moins %d caractère alphabétique .Votre nouveau mot de passe doit avoir au moins %d caractères alphabétiques.Votre nouveau mot de passe doit avoir au moins %d caractère alphanumérique.Votre nouveau mot de passe doit avoir au moins %d caractères alphanumériques.Votre nouveau mot de passe doit avoir au moins %d types de caractères différents. Les types sont : minuscule, majuscule, numérique et symboles.Votre nouveau mot de passe doit avoir au moins %d lettre en minuscule.Votre nouveau mot de passe doit avoir au moins %d lettres en minuscule.Votre nouveau mot de passe doit avoir au moins %d caractère numérique.Votre nouveau mot de passe doit avoir au moins %d caractères numériques.Votre nouveau mot de passe doit avoir au moins %d caractère numérique.Votre nouveau mot de passe doit avoir au moins %d caractères numériques.Votre nouveau mot de passe doit avoir au moins %d lettre en majuscule.Votre nouveau mot de passe doit avoir au moins %d lettres en majuscule.Votre nouveau mot de passe doit avoir moins de %d espaces.Votre nouveau mot de passe ne doit pas contenir d'espaces.Votre compte a été verrouillé %d minutesVotre compte a été verrouillé définitivementHorde_Auth-2.1.11/locale/fr/LC_MESSAGES/Horde_Auth.po0000664000175000017500000001062612653661601017752 0ustar janjan# French translations for Horde_Auth package. # Copyright (C) 2013 Horde LLC (http://www.horde.org/) # This file is distributed under the same license as the Horde_Auth package. # # Automatically generated, 2013. # Paul De Vlieger , 2013 msgid "" msgstr "" "Project-Id-Version: Horde_Auth \n" "Report-Msgid-Bugs-To: dev@lists.horde.org\n" "POT-Creation-Date: 2012-11-06 16:40+0100\n" "PO-Revision-Date: 2013-01-14 10:11+0100\n" "Last-Translator: Paul De Vlieger \n" "Language-Team: French \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" "X-Generator: Lokalize 1.4\n" #: lib/Horde/Auth.php:353 #, php-format msgid "" "The password is too long; passwords may not be more than %d characters long!" msgstr "" "Votre nouveau mot de passe est trop long ; un mot de passe ne peut posséder " "plus de %d caractères !" #: lib/Horde/Auth.php:421 lib/Horde/Auth.php:430 msgid "The password is too simple to guess." msgstr "Votre nouveau mot de passe est trop simple." #: lib/Horde/Auth.php:349 #, php-format msgid "The password must be at least %d characters long!" msgstr "Votre nouveau mot de passe doit avoir au moins %d caractères !" #: lib/Horde/Auth.php:385 #, php-format msgid "The password must contain at least %d alphabetic character." msgid_plural "The password must contain at least %d alphabetic characters." msgstr[0] "" "Votre nouveau mot de passe doit avoir au moins %d caractère alphabétique ." msgstr[1] "" "Votre nouveau mot de passe doit avoir au moins %d caractères alphabétiques." #: lib/Horde/Auth.php:388 #, php-format msgid "The password must contain at least %d alphanumeric character." msgid_plural "The password must contain at least %d alphanumeric characters." msgstr[0] "" "Votre nouveau mot de passe doit avoir au moins %d caractère alphanumérique." msgstr[1] "" "Votre nouveau mot de passe doit avoir au moins %d caractères alphanumériques." #: lib/Horde/Auth.php:391 #, php-format msgid "" "The password must contain at least %d different types of characters. The " "types are: lower, upper, numeric, and symbols." msgstr "" "Votre nouveau mot de passe doit avoir au moins %d types de caractères " "différents. Les types sont : minuscule, majuscule, numérique et symboles." #: lib/Horde/Auth.php:379 #, php-format msgid "The password must contain at least %d lowercase character." msgid_plural "The password must contain at least %d lowercase characters." msgstr[0] "" "Votre nouveau mot de passe doit avoir au moins %d lettre en minuscule." msgstr[1] "" "Votre nouveau mot de passe doit avoir au moins %d lettres en minuscule." #: lib/Horde/Auth.php:382 #, php-format msgid "The password must contain at least %d numeric character." msgid_plural "The password must contain at least %d numeric characters." msgstr[0] "" "Votre nouveau mot de passe doit avoir au moins %d caractère numérique." msgstr[1] "" "Votre nouveau mot de passe doit avoir au moins %d caractères numériques." #: lib/Horde/Auth.php:400 #, php-format msgid "The password must contain at least %d symbol character." msgid_plural "The password must contain at least %d symbol characters." msgstr[0] "" "Votre nouveau mot de passe doit avoir au moins %d caractère numérique." msgstr[1] "" "Votre nouveau mot de passe doit avoir au moins %d caractères numériques." #: lib/Horde/Auth.php:376 #, php-format msgid "The password must contain at least %d uppercase character." msgid_plural "The password must contain at least %d uppercase characters." msgstr[0] "" "Votre nouveau mot de passe doit avoir au moins %d lettre en majuscule." msgstr[1] "" "Votre nouveau mot de passe doit avoir au moins %d lettres en majuscule." #: lib/Horde/Auth.php:395 #, php-format msgid "The password must contain less than %d whitespace characters." msgstr "Votre nouveau mot de passe doit avoir moins de %d espaces." #: lib/Horde/Auth.php:397 msgid "The password must not contain whitespace characters." msgstr "Votre nouveau mot de passe ne doit pas contenir d'espaces." #: lib/Horde/Auth/Base.php:148 #, php-format msgid "Your account has been locked for %d minutes" msgstr "Votre compte a été verrouillé %d minutes" #: lib/Horde/Auth/Base.php:146 msgid "Your account has been permanently locked" msgstr "Votre compte a été verrouillé définitivement" Horde_Auth-2.1.11/locale/hu/LC_MESSAGES/Horde_Auth.mo0000664000175000017500000000660112653661601017752 0ustar janjanxLy$1x|wvrupvo=4$+Y(;4(p:a}6 g= c ia 7 % 0) &Z    The password is too long; passwords may not be more than %d characters long!The password is too simple to guess.The password must be at least %d characters long!The password must contain at least %d alphabetic character.The password must contain at least %d alphabetic characters.The password must contain at least %d alphanumeric character.The password must contain at least %d alphanumeric characters.The password must contain at least %d different types of characters. The types are: lower, upper, numeric, and symbols.The password must contain at least %d lowercase character.The password must contain at least %d lowercase characters.The password must contain at least %d numeric character.The password must contain at least %d numeric characters.The password must contain at least %d numeric or special character.The password must contain at least %d numeric or special characters.The password must contain at least %d symbol character.The password must contain at least %d symbol characters.The password must contain at least %d uppercase character.The password must contain at least %d uppercase characters.The password must contain less than %d whitespace characters.The password must not contain whitespace characters.Your account has been locked for %d minutesYour account has been permanently lockedProject-Id-Version: Horde_Auth Report-Msgid-Bugs-To: dev@lists.horde.org POT-Creation-Date: 2014-03-25 18:08+0100 PO-Revision-Date: 2014-07-14 11:35+0200 Last-Translator: Andras Galos Language-Team: i18n@lists.horde.org Language: hu MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=2; plural=(n != 1); A jelszó túl hosszú! Nem lehet hosszabb %d karakternél!A jelszavad túl könnyen kitalálható.A jelszónak legalább %d karakter hosszúnak kell lennie!A jelszó legalább %d betűt kell tartalmazzon.A jelszó legalább %d betűt kell tartalmazzon.A jelszó legalább %d betűt, vagy számot kell tartalmazzon.A jelszó legalább %d betűt, vagy számot kell tartalmazzon.A jelszó legalább %d, különböző típusú karaktert kell tartalmazzon. A típusok: kisbetű, nagybetű, szám, speciális karakter.A jelszó legalább %d kisbetűt kell tartalmazzon.A jelszó legalább %d kisbetűt kell tartalmazzon.A jelszó legalább %d számot kell tartalmazzon.A jelszó legalább %d számot kell tartalmazzon.A jelszó legalább %d számot, vagy speciális karaktert kell tartalmazzon.A jelszó legalább %d számot, vagy speciális karaktert kell tartalmazzon.A jelszó legalább %d speciális karaktert (pl. százalékjel, pont, stb.) kell tartalmazzon.A jelszó legalább %d speciális karaktert (pl. százalékjel, pont, stb.) kell tartalmazzon.A jelszó legalább %d nagybetűt kell tartalmazzon.A jelszó legalább %d nagybetűt kell tartalmazzon.A jelszó nem tartalmazhat kevesebb, mint %d szóközt.A jelszó nem tartalmazhat szóközt.A hozzáférése %d percre fel lett függesztve.A hozzáférése fel lett függesztve.Horde_Auth-2.1.11/locale/hu/LC_MESSAGES/Horde_Auth.po0000664000175000017500000001052012653661601017750 0ustar janjan# Hungarian translations for Horde_Auth package. # Copyright (C) 2014 Horde LLC (http://www.horde.org/) # This file is distributed under the same license as the Horde_Auth package. # msgid "" msgstr "" "Project-Id-Version: Horde_Auth \n" "Report-Msgid-Bugs-To: dev@lists.horde.org\n" "POT-Creation-Date: 2014-03-25 18:08+0100\n" "PO-Revision-Date: 2014-07-14 11:35+0200\n" "Last-Translator: Andras Galos \n" "Language-Team: i18n@lists.horde.org\n" "Language: hu\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: lib/Horde/Auth.php:375 #, php-format msgid "" "The password is too long; passwords may not be more than %d characters long!" msgstr "A jelszó túl hosszú! Nem lehet hosszabb %d karakternél!" #: lib/Horde/Auth.php:446 lib/Horde/Auth.php:456 msgid "The password is too simple to guess." msgstr "A jelszavad túl könnyen kitalálható." #: lib/Horde/Auth.php:371 #, php-format msgid "The password must be at least %d characters long!" msgstr "A jelszónak legalább %d karakter hosszúnak kell lennie!" #: lib/Horde/Auth.php:407 #, php-format msgid "The password must contain at least %d alphabetic character." msgid_plural "The password must contain at least %d alphabetic characters." msgstr[0] "A jelszó legalább %d betűt kell tartalmazzon." msgstr[1] "A jelszó legalább %d betűt kell tartalmazzon." #: lib/Horde/Auth.php:410 #, php-format msgid "The password must contain at least %d alphanumeric character." msgid_plural "The password must contain at least %d alphanumeric characters." msgstr[0] "A jelszó legalább %d betűt, vagy számot kell tartalmazzon." msgstr[1] "A jelszó legalább %d betűt, vagy számot kell tartalmazzon." #: lib/Horde/Auth.php:416 #, php-format msgid "" "The password must contain at least %d different types of characters. The " "types are: lower, upper, numeric, and symbols." msgstr "" "A jelszó legalább %d, különböző típusú karaktert kell tartalmazzon. A " "típusok: kisbetű, nagybetű, szám, speciális karakter." #: lib/Horde/Auth.php:401 #, php-format msgid "The password must contain at least %d lowercase character." msgid_plural "The password must contain at least %d lowercase characters." msgstr[0] "A jelszó legalább %d kisbetűt kell tartalmazzon." msgstr[1] "A jelszó legalább %d kisbetűt kell tartalmazzon." #: lib/Horde/Auth.php:404 #, php-format msgid "The password must contain at least %d numeric character." msgid_plural "The password must contain at least %d numeric characters." msgstr[0] "A jelszó legalább %d számot kell tartalmazzon." msgstr[1] "A jelszó legalább %d számot kell tartalmazzon." #: lib/Horde/Auth.php:413 #, php-format msgid "The password must contain at least %d numeric or special character." msgid_plural "" "The password must contain at least %d numeric or special characters." msgstr[0] "" "A jelszó legalább %d számot, vagy speciális karaktert kell tartalmazzon." msgstr[1] "" "A jelszó legalább %d számot, vagy speciális karaktert kell tartalmazzon." #: lib/Horde/Auth.php:425 #, php-format msgid "The password must contain at least %d symbol character." msgid_plural "The password must contain at least %d symbol characters." msgstr[0] "" "A jelszó legalább %d speciális karaktert (pl. százalékjel, pont, stb.) kell " "tartalmazzon." msgstr[1] "" "A jelszó legalább %d speciális karaktert (pl. százalékjel, pont, stb.) kell " "tartalmazzon." #: lib/Horde/Auth.php:398 #, php-format msgid "The password must contain at least %d uppercase character." msgid_plural "The password must contain at least %d uppercase characters." msgstr[0] "A jelszó legalább %d nagybetűt kell tartalmazzon." msgstr[1] "A jelszó legalább %d nagybetűt kell tartalmazzon." #: lib/Horde/Auth.php:420 #, php-format msgid "The password must contain less than %d whitespace characters." msgstr "A jelszó nem tartalmazhat kevesebb, mint %d szóközt." #: lib/Horde/Auth.php:422 msgid "The password must not contain whitespace characters." msgstr "A jelszó nem tartalmazhat szóközt." #: lib/Horde/Auth/Base.php:156 #, php-format msgid "Your account has been locked for %d minutes" msgstr "A hozzáférése %d percre fel lett függesztve." #: lib/Horde/Auth/Base.php:154 msgid "Your account has been permanently locked" msgstr "A hozzáférése fel lett függesztve." Horde_Auth-2.1.11/locale/ja/LC_MESSAGES/Horde_Auth.mo0000664000175000017500000000636512653661601017737 0ustar janjanxLy$1x|wvrupvo=4$+Y(QL'FR U` UH R [ RM U @ 67 Cn B    The password is too long; passwords may not be more than %d characters long!The password is too simple to guess.The password must be at least %d characters long!The password must contain at least %d alphabetic character.The password must contain at least %d alphabetic characters.The password must contain at least %d alphanumeric character.The password must contain at least %d alphanumeric characters.The password must contain at least %d different types of characters. The types are: lower, upper, numeric, and symbols.The password must contain at least %d lowercase character.The password must contain at least %d lowercase characters.The password must contain at least %d numeric character.The password must contain at least %d numeric characters.The password must contain at least %d numeric or special character.The password must contain at least %d numeric or special characters.The password must contain at least %d symbol character.The password must contain at least %d symbol characters.The password must contain at least %d uppercase character.The password must contain at least %d uppercase characters.The password must contain less than %d whitespace characters.The password must not contain whitespace characters.Your account has been locked for %d minutesYour account has been permanently lockedProject-Id-Version: Horde_Auth Report-Msgid-Bugs-To: dev@lists.horde.org POT-Creation-Date: 2013-06-04 11:48+0200 PO-Revision-Date: 2013-06-05 10:33+0900 Last-Translator: Hiromi Kimura Language-Team: i18n@lists.horde.org Language: ja MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=1; plural=0; X-Generator: Poedit 1.5.4 パスワードが長すぎます。%d 文字より長くしないで下さい!パスワードが簡単すぎます。パスワードは少なくとも %d 文字以上にして下さい!パスワードには少なくとも %d 個以上の英字を含めて下さい。パスワードには少なくとも %d 個以上の英数字を含めて下さい。パスワードには少なくとも %d 個の異なる文字を含めて下さい。つまり、小文字、大文字、数字と記号です。パスワードには少なくとも %d 個以上の小文字を含めて下さい。パスワードには少なくとも %d 個以上の数字を含めて下さい。パスワードには少なくとも %d 個以上の数字か記号を含めて下さい。パスワードには少なくとも %d 個以上の記号を含めて下さい。パスワードには少なくとも %d 個以上の大文字を含めて下さい。パスワード中の空白は %d 個以下にして下さい。パスワードに空白を入れないで下さい。あなたのアカウントは %d 分間ロックされていますあなたのアカウントは完全にロックされていますHorde_Auth-2.1.11/locale/ja/LC_MESSAGES/Horde_Auth.po0000664000175000017500000001017212653661601017731 0ustar janjan# Japanese translation for Horde. # Copyright 2004-2012 Horde LLC (http://www.horde.org/) # This file is distributed under the same license as the Horde package. # Hiromi Kimura # msgid "" msgstr "" "Project-Id-Version: Horde_Auth\n" "Report-Msgid-Bugs-To: dev@lists.horde.org\n" "POT-Creation-Date: 2013-06-04 11:48+0200\n" "PO-Revision-Date: 2013-06-05 10:33+0900\n" "Last-Translator: Hiromi Kimura \n" "Language-Team: i18n@lists.horde.org\n" "Language: ja\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" "X-Generator: Poedit 1.5.4\n" #: lib/Horde/Auth.php:362 #, php-format msgid "" "The password is too long; passwords may not be more than %d characters long!" msgstr "パスワードが長すぎます。%d 文字より長くしないで下さい!" #: lib/Horde/Auth.php:433 lib/Horde/Auth.php:442 msgid "The password is too simple to guess." msgstr "パスワードが簡単すぎます。" #: lib/Horde/Auth.php:358 #, php-format msgid "The password must be at least %d characters long!" msgstr "パスワードは少なくとも %d 文字以上にして下さい!" #: lib/Horde/Auth.php:394 #, php-format msgid "The password must contain at least %d alphabetic character." msgid_plural "The password must contain at least %d alphabetic characters." msgstr[0] "パスワードには少なくとも %d 個以上の英字を含めて下さい。" #: lib/Horde/Auth.php:397 #, php-format msgid "The password must contain at least %d alphanumeric character." msgid_plural "The password must contain at least %d alphanumeric characters." msgstr[0] "パスワードには少なくとも %d 個以上の英数字を含めて下さい。" #: lib/Horde/Auth.php:403 #, php-format msgid "" "The password must contain at least %d different types of characters. The " "types are: lower, upper, numeric, and symbols." msgstr "" "パスワードには少なくとも %d 個の異なる文字を含めて下さい。つまり、小文字、大" "文字、数字と記号です。" #: lib/Horde/Auth.php:388 #, php-format msgid "The password must contain at least %d lowercase character." msgid_plural "The password must contain at least %d lowercase characters." msgstr[0] "パスワードには少なくとも %d 個以上の小文字を含めて下さい。" #: lib/Horde/Auth.php:391 #, php-format msgid "The password must contain at least %d numeric character." msgid_plural "The password must contain at least %d numeric characters." msgstr[0] "パスワードには少なくとも %d 個以上の数字を含めて下さい。" #: lib/Horde/Auth.php:400 #, php-format msgid "The password must contain at least %d numeric or special character." msgid_plural "" "The password must contain at least %d numeric or special characters." msgstr[0] "パスワードには少なくとも %d 個以上の数字か記号を含めて下さい。" #: lib/Horde/Auth.php:412 #, php-format msgid "The password must contain at least %d symbol character." msgid_plural "The password must contain at least %d symbol characters." msgstr[0] "パスワードには少なくとも %d 個以上の記号を含めて下さい。" #: lib/Horde/Auth.php:385 #, php-format msgid "The password must contain at least %d uppercase character." msgid_plural "The password must contain at least %d uppercase characters." msgstr[0] "パスワードには少なくとも %d 個以上の大文字を含めて下さい。" #: lib/Horde/Auth.php:407 #, php-format msgid "The password must contain less than %d whitespace characters." msgstr "パスワード中の空白は %d 個以下にして下さい。" #: lib/Horde/Auth.php:409 msgid "The password must not contain whitespace characters." msgstr "パスワードに空白を入れないで下さい。" #: lib/Horde/Auth/Base.php:156 #, php-format msgid "Your account has been locked for %d minutes" msgstr "あなたのアカウントは %d 分間ロックされています" #: lib/Horde/Auth/Base.php:154 msgid "Your account has been permanently locked" msgstr "あなたのアカウントは完全にロックされています" Horde_Auth-2.1.11/locale/lv/LC_MESSAGES/Horde_Auth.mo0000664000175000017500000000624712653661601017765 0ustar janjan 0L1$~1x|NwvCrp-v=4SI{&0za p ;? +{    The password is too long; passwords may not be more than %d characters long!The password is too simple to guess.The password must be at least %d characters long!The password must contain at least %d alphabetic character.The password must contain at least %d alphabetic characters.The password must contain at least %d alphanumeric character.The password must contain at least %d alphanumeric characters.The password must contain at least %d different types of characters. The types are: lower, upper, numeric, and symbols.The password must contain at least %d lowercase character.The password must contain at least %d lowercase characters.The password must contain at least %d numeric character.The password must contain at least %d numeric characters.The password must contain at least %d symbol character.The password must contain at least %d symbol characters.The password must contain at least %d uppercase character.The password must contain at least %d uppercase characters.The password must contain less than %d whitespace characters.The password must not contain whitespace characters.Project-Id-Version: Horde_Auth Report-Msgid-Bugs-To: dev@lists.horde.org POT-Creation-Date: 2011-09-28 00:27+0200 PO-Revision-Date: 2011-11-04 13:26+0300 Last-Translator: Jānis Eisaks Language-Team: i18n@lists.horde.org Language: lv MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n != 0 ? 1 : 2); X-Poedit-Language: Latvian X-Poedit-Country: LATVIA X-Poedit-SourceCharset: utf-8 Jaunā parole ir pārāk gara: paroles garums nevar pārsniegt %d zīmes!Jūs jaunā parole ir viegli uzminama.Jaunajai parolei jābūt vismaz %d zīmes garai!Jaunajai parolei jāsatur vismaz %d alfabēta burtu.Jaunajai parolei jāsatur vismaz %d alfabēta burtus.Jaunajai parolei jāsatur vismaz %d alfabēta burtus.Jaunajai parolei jāsatur vismaz %d burtu un ciparu.Jaunajai parolei jāsatur vismaz %d burtus un ciparus.Jaunajai parolei jāsatur vismaz %d burtus un ciparus.Jaunajai parolei jāsatur vismaz %d dažāda veida zīmes. Tie būtu: parastie un kapitalizētie burti, cipari un simboli.Jaunajai parolei jāsatur vismaz %d mazo burtu.Jaunajai parolei jāsatur vismaz %d mazos burtus.Jaunajai parolei jāsatur vismaz %d mazos burtus.Jaunajai parolei jāsatur vismaz %d ciparu.Jaunajai parolei jāsatur vismaz %d ciparus.Jaunajai parolei jāsatur vismaz %d ciparu.Jaunajai parolei jāsatur vismaz %d simbolu zīmi.Jaunajai parolei jāsatur vismaz %d simbolu zīmes.Jaunajai parolei jāsatur vismaz %d simbolu zīmes.Jaunajai parolei jāsatur vismaz %d kapitalizēto burtu.Jaunajai parolei jāsatur vismaz %d kapitalizētos burtus.Jaunajai parolei jāsatur vismaz %d kapitalizētos burtus.Jaunā parole drīkst saturēt ne vairāk kā %d tukšumus.Jaunā parole nedrīkst saturēt tukšumus.Horde_Auth-2.1.11/locale/lv/LC_MESSAGES/Horde_Auth.po0000664000175000017500000001013012653661601017752 0ustar janjan# Latvian translations for Horde_Auth package. # Copyright 2011-2016 Horde LLC (http://www.horde.org/) # This file is distributed under the same license as the Horde_Auth package. # Automatically generated, 2011. # msgid "" msgstr "" "Project-Id-Version: Horde_Auth\n" "Report-Msgid-Bugs-To: dev@lists.horde.org\n" "POT-Creation-Date: 2011-09-28 00:27+0200\n" "PO-Revision-Date: 2011-11-04 13:26+0300\n" "Last-Translator: Jānis Eisaks \n" "Language-Team: i18n@lists.horde.org\n" "Language: lv\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n != 0 ? 1 : " "2);\n" "X-Poedit-Language: Latvian\n" "X-Poedit-Country: LATVIA\n" "X-Poedit-SourceCharset: utf-8\n" #: lib/Horde/Auth.php:355 #, php-format msgid "" "The password is too long; passwords may not be more than %d characters long!" msgstr "Jaunā parole ir pārāk gara: paroles garums nevar pārsniegt %d zīmes!" #: lib/Horde/Auth.php:424 lib/Horde/Auth.php:433 msgid "The password is too simple to guess." msgstr "Jūs jaunā parole ir viegli uzminama." #: lib/Horde/Auth.php:351 #, php-format msgid "The password must be at least %d characters long!" msgstr "Jaunajai parolei jābūt vismaz %d zīmes garai!" #: lib/Horde/Auth.php:387 #, php-format msgid "The password must contain at least %d alphabetic character." msgid_plural "The password must contain at least %d alphabetic characters." msgstr[0] "Jaunajai parolei jāsatur vismaz %d alfabēta burtu." msgstr[1] "Jaunajai parolei jāsatur vismaz %d alfabēta burtus." msgstr[2] "Jaunajai parolei jāsatur vismaz %d alfabēta burtus." #: lib/Horde/Auth.php:390 #, php-format msgid "The password must contain at least %d alphanumeric character." msgid_plural "The password must contain at least %d alphanumeric characters." msgstr[0] "Jaunajai parolei jāsatur vismaz %d burtu un ciparu." msgstr[1] "Jaunajai parolei jāsatur vismaz %d burtus un ciparus." msgstr[2] "Jaunajai parolei jāsatur vismaz %d burtus un ciparus." #: lib/Horde/Auth.php:393 #, php-format msgid "" "The password must contain at least %d different types of characters. The " "types are: lower, upper, numeric, and symbols." msgstr "" "Jaunajai parolei jāsatur vismaz %d dažāda veida zīmes. Tie būtu: parastie un " "kapitalizētie burti, cipari un simboli." #: lib/Horde/Auth.php:381 #, php-format msgid "The password must contain at least %d lowercase character." msgid_plural "The password must contain at least %d lowercase characters." msgstr[0] "Jaunajai parolei jāsatur vismaz %d mazo burtu." msgstr[1] "Jaunajai parolei jāsatur vismaz %d mazos burtus." msgstr[2] "Jaunajai parolei jāsatur vismaz %d mazos burtus." #: lib/Horde/Auth.php:384 #, php-format msgid "The password must contain at least %d numeric character." msgid_plural "The password must contain at least %d numeric characters." msgstr[0] "Jaunajai parolei jāsatur vismaz %d ciparu." msgstr[1] "Jaunajai parolei jāsatur vismaz %d ciparus." msgstr[2] "Jaunajai parolei jāsatur vismaz %d ciparu." #: lib/Horde/Auth.php:402 #, php-format msgid "The password must contain at least %d symbol character." msgid_plural "The password must contain at least %d symbol characters." msgstr[0] "Jaunajai parolei jāsatur vismaz %d simbolu zīmi." msgstr[1] "Jaunajai parolei jāsatur vismaz %d simbolu zīmes." msgstr[2] "Jaunajai parolei jāsatur vismaz %d simbolu zīmes." #: lib/Horde/Auth.php:378 #, php-format msgid "The password must contain at least %d uppercase character." msgid_plural "The password must contain at least %d uppercase characters." msgstr[0] "Jaunajai parolei jāsatur vismaz %d kapitalizēto burtu." msgstr[1] "Jaunajai parolei jāsatur vismaz %d kapitalizētos burtus." msgstr[2] "Jaunajai parolei jāsatur vismaz %d kapitalizētos burtus." #: lib/Horde/Auth.php:397 #, php-format msgid "The password must contain less than %d whitespace characters." msgstr "Jaunā parole drīkst saturēt ne vairāk kā %d tukšumus." #: lib/Horde/Auth.php:399 msgid "The password must not contain whitespace characters." msgstr "Jaunā parole nedrīkst saturēt tukšumus." Horde_Auth-2.1.11/locale/pl/LC_MESSAGES/Horde_Auth.mo0000664000175000017500000000764012653661601017755 0ustar janjanxLy$1x|wvrupvo=4$+Y(P+4( ] H j I@,H*u   The password is too long; passwords may not be more than %d characters long!The password is too simple to guess.The password must be at least %d characters long!The password must contain at least %d alphabetic character.The password must contain at least %d alphabetic characters.The password must contain at least %d alphanumeric character.The password must contain at least %d alphanumeric characters.The password must contain at least %d different types of characters. The types are: lower, upper, numeric, and symbols.The password must contain at least %d lowercase character.The password must contain at least %d lowercase characters.The password must contain at least %d numeric character.The password must contain at least %d numeric characters.The password must contain at least %d numeric or special character.The password must contain at least %d numeric or special characters.The password must contain at least %d symbol character.The password must contain at least %d symbol characters.The password must contain at least %d uppercase character.The password must contain at least %d uppercase characters.The password must contain less than %d whitespace characters.The password must not contain whitespace characters.Your account has been locked for %d minutesYour account has been permanently lockedProject-Id-Version: Horde 5.0 Report-Msgid-Bugs-To: dev@lists.horde.org POT-Creation-Date: 2013-10-14 14:26+0200 PO-Revision-Date: 2014-03-23 22:10+0100 Last-Translator: Maciej Uhlig Language-Team: Polish Language: pl MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2); X-Generator: Poedit 1.6.4 X-Poedit-Basepath: e:\git\horde5new Twoje hasło jest zbyt długie; hasła nie mogą być dłuższe niż %d znaków!Twoje hasło można zbyt łatwo odgadnąć.Twoje hasło musi posiadać przynajmniej %d znaków!Twoje hasło musi zawierać przynajmniej %d literę.Twoje hasło musi zawierać przynajmniej %d litery.Twoje hasło musi zawierać przynajmniej %d liter.Twoje hasło musi zawierać przynajmniej %d znak alfanumeryczny.Twoje hasło musi zawierać przynajmniej %d znaki alfanumeryczne.Twoje hasło musi zawierać przynajmniej %d znaków alfanumerycznych.Twoje hasło musi zawierać przynajmniej %d różnych typów znaków. Typy znaków to: małe litery, wielkie litery, cyfry i symbole.Twoje hasło musi zawierać przynajmniej %d małą literę.Twoje hasło musi zawierać przynajmniej %d małe litery.Twoje hasło musi zawierać przynajmniej %d małych liter.Twoje hasło musi zawierać przynajmniej %d cyfrę.Twoje hasło musi zawierać przynajmniej %d cyfry.Twoje hasło musi zawierać przynajmniej %d cyfr.Twoje hasło musi zawierać przynajmniej %d cyfrę lub znak specjalny.Twoje hasło musi zawierać przynajmniej %d cyfry lub znaki specjalne.Twoje hasło musi zawierać przynajmniej %d cyfr lub znaków specjalnych.Twoje hasło musi zawierać przynajmniej %d symbol.Twoje hasło musi zawierać przynajmniej %d symbole.Twoje hasło musi zawierać przynajmniej %d symboli.Twoje hasło musi zawierać przynajmniej %d wielką literę.Twoje hasło musi zawierać przynajmniej %d wielkie litery.Twoje hasło musi zawierać przynajmniej %d wielkich liter.Twoje hasło musi zawierać mniej niż %d białych znaków (spacji itp.).Twoje hasło nie może zawierać białych znaków (spacji itp.).Twoje konto zostało zablokowane na %d minutTwoje konto zostało zablokowane na stałeHorde_Auth-2.1.11/locale/pl/LC_MESSAGES/Horde_Auth.po0000664000175000017500000001230712653661601017754 0ustar janjan# Polish translations for Horde. # Copyright 2001-2013 Horde LLC (http://www.horde.org/) # This file is distributed under the same license as the Horde package. # Mariusz Zynel , 2001. # Piotr Roszatycki , 2001. # Krzysztof Kozlowski , 2005. # Daniel Horecki , 2007. # Krzysztof Kozera , 2012. # Maciej Uhlig , 2014. # msgid "" msgstr "" "Project-Id-Version: Horde 5.0\n" "Report-Msgid-Bugs-To: dev@lists.horde.org\n" "POT-Creation-Date: 2013-10-14 14:26+0200\n" "PO-Revision-Date: 2014-03-23 22:10+0100\n" "Last-Translator: Maciej Uhlig \n" "Language-Team: Polish \n" "Language: pl\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " "|| n%100>=20) ? 1 : 2);\n" "X-Generator: Poedit 1.6.4\n" "X-Poedit-Basepath: e:\\git\\horde5new\n" #: lib/Horde/Auth.php:362 #, php-format msgid "" "The password is too long; passwords may not be more than %d characters long!" msgstr "" "Twoje hasło jest zbyt długie; hasła nie mogą być dłuższe niż %d znaków!" #: lib/Horde/Auth.php:433 lib/Horde/Auth.php:443 msgid "The password is too simple to guess." msgstr "Twoje hasło można zbyt łatwo odgadnąć." #: lib/Horde/Auth.php:358 #, php-format msgid "The password must be at least %d characters long!" msgstr "Twoje hasło musi posiadać przynajmniej %d znaków!" #: lib/Horde/Auth.php:394 #, php-format msgid "The password must contain at least %d alphabetic character." msgid_plural "The password must contain at least %d alphabetic characters." msgstr[0] "Twoje hasło musi zawierać przynajmniej %d literę." msgstr[1] "Twoje hasło musi zawierać przynajmniej %d litery." msgstr[2] "Twoje hasło musi zawierać przynajmniej %d liter." #: lib/Horde/Auth.php:397 #, php-format msgid "The password must contain at least %d alphanumeric character." msgid_plural "The password must contain at least %d alphanumeric characters." msgstr[0] "Twoje hasło musi zawierać przynajmniej %d znak alfanumeryczny." msgstr[1] "Twoje hasło musi zawierać przynajmniej %d znaki alfanumeryczne." msgstr[2] "Twoje hasło musi zawierać przynajmniej %d znaków alfanumerycznych." #: lib/Horde/Auth.php:403 #, php-format msgid "" "The password must contain at least %d different types of characters. The " "types are: lower, upper, numeric, and symbols." msgstr "" "Twoje hasło musi zawierać przynajmniej %d różnych typów znaków. Typy znaków " "to: małe litery, wielkie litery, cyfry i symbole." #: lib/Horde/Auth.php:388 #, php-format msgid "The password must contain at least %d lowercase character." msgid_plural "The password must contain at least %d lowercase characters." msgstr[0] "Twoje hasło musi zawierać przynajmniej %d małą literę." msgstr[1] "Twoje hasło musi zawierać przynajmniej %d małe litery." msgstr[2] "Twoje hasło musi zawierać przynajmniej %d małych liter." #: lib/Horde/Auth.php:391 #, php-format msgid "The password must contain at least %d numeric character." msgid_plural "The password must contain at least %d numeric characters." msgstr[0] "Twoje hasło musi zawierać przynajmniej %d cyfrę." msgstr[1] "Twoje hasło musi zawierać przynajmniej %d cyfry." msgstr[2] "Twoje hasło musi zawierać przynajmniej %d cyfr." #: lib/Horde/Auth.php:400 #, php-format msgid "The password must contain at least %d numeric or special character." msgid_plural "" "The password must contain at least %d numeric or special characters." msgstr[0] "Twoje hasło musi zawierać przynajmniej %d cyfrę lub znak specjalny." msgstr[1] "" "Twoje hasło musi zawierać przynajmniej %d cyfry lub znaki specjalne." msgstr[2] "" "Twoje hasło musi zawierać przynajmniej %d cyfr lub znaków specjalnych." #: lib/Horde/Auth.php:412 #, php-format msgid "The password must contain at least %d symbol character." msgid_plural "The password must contain at least %d symbol characters." msgstr[0] "Twoje hasło musi zawierać przynajmniej %d symbol." msgstr[1] "Twoje hasło musi zawierać przynajmniej %d symbole." msgstr[2] "Twoje hasło musi zawierać przynajmniej %d symboli." #: lib/Horde/Auth.php:385 #, php-format msgid "The password must contain at least %d uppercase character." msgid_plural "The password must contain at least %d uppercase characters." msgstr[0] "Twoje hasło musi zawierać przynajmniej %d wielką literę." msgstr[1] "Twoje hasło musi zawierać przynajmniej %d wielkie litery." msgstr[2] "Twoje hasło musi zawierać przynajmniej %d wielkich liter." #: lib/Horde/Auth.php:407 #, php-format msgid "The password must contain less than %d whitespace characters." msgstr "Twoje hasło musi zawierać mniej niż %d białych znaków (spacji itp.)." #: lib/Horde/Auth.php:409 msgid "The password must not contain whitespace characters." msgstr "Twoje hasło nie może zawierać białych znaków (spacji itp.)." #: lib/Horde/Auth/Base.php:156 #, php-format msgid "Your account has been locked for %d minutes" msgstr "Twoje konto zostało zablokowane na %d minut" #: lib/Horde/Auth/Base.php:154 msgid "Your account has been permanently locked" msgstr "Twoje konto zostało zablokowane na stałe" Horde_Auth-2.1.11/locale/Horde_Auth.pot0000664000175000017500000000602712653661601015742 0ustar janjan# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Horde LLC (http://www.horde.org/) # This file is distributed under the same license as the Horde_Auth package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Horde_Auth\n" "Report-Msgid-Bugs-To: dev@lists.horde.org\n" "POT-Creation-Date: 2014-03-25 18:08+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" #: lib/Horde/Auth.php:375 #, php-format msgid "" "The password is too long; passwords may not be more than %d characters long!" msgstr "" #: lib/Horde/Auth.php:446 lib/Horde/Auth.php:456 msgid "The password is too simple to guess." msgstr "" #: lib/Horde/Auth.php:371 #, php-format msgid "The password must be at least %d characters long!" msgstr "" #: lib/Horde/Auth.php:407 #, php-format msgid "The password must contain at least %d alphabetic character." msgid_plural "The password must contain at least %d alphabetic characters." msgstr[0] "" msgstr[1] "" #: lib/Horde/Auth.php:410 #, php-format msgid "The password must contain at least %d alphanumeric character." msgid_plural "The password must contain at least %d alphanumeric characters." msgstr[0] "" msgstr[1] "" #: lib/Horde/Auth.php:416 #, php-format msgid "" "The password must contain at least %d different types of characters. The " "types are: lower, upper, numeric, and symbols." msgstr "" #: lib/Horde/Auth.php:401 #, php-format msgid "The password must contain at least %d lowercase character." msgid_plural "The password must contain at least %d lowercase characters." msgstr[0] "" msgstr[1] "" #: lib/Horde/Auth.php:404 #, php-format msgid "The password must contain at least %d numeric character." msgid_plural "The password must contain at least %d numeric characters." msgstr[0] "" msgstr[1] "" #: lib/Horde/Auth.php:413 #, php-format msgid "The password must contain at least %d numeric or special character." msgid_plural "" "The password must contain at least %d numeric or special characters." msgstr[0] "" msgstr[1] "" #: lib/Horde/Auth.php:425 #, php-format msgid "The password must contain at least %d symbol character." msgid_plural "The password must contain at least %d symbol characters." msgstr[0] "" msgstr[1] "" #: lib/Horde/Auth.php:398 #, php-format msgid "The password must contain at least %d uppercase character." msgid_plural "The password must contain at least %d uppercase characters." msgstr[0] "" msgstr[1] "" #: lib/Horde/Auth.php:420 #, php-format msgid "The password must contain less than %d whitespace characters." msgstr "" #: lib/Horde/Auth.php:422 msgid "The password must not contain whitespace characters." msgstr "" #: lib/Horde/Auth/Base.php:156 #, php-format msgid "Your account has been locked for %d minutes" msgstr "" #: lib/Horde/Auth/Base.php:154 msgid "Your account has been permanently locked" msgstr "" Horde_Auth-2.1.11/migration/Horde/Auth/1_horde_auth_base_tables.php0000664000175000017500000000131512653661601023262 0ustar janjantables())) { $t = $this->createTable('horde_users', array('autoincrementKey' => array('user_uid'))); $t->column('user_uid', 'string', array('limit' => 255, 'null' => false)); $t->column('user_pass', 'string', array('limit' => 255, 'null' => false)); $t->column('user_soft_expiration_date', 'integer'); $t->column('user_hard_expiration_date', 'integer'); $t->end(); } } /** */ public function down() { $this->dropTable('horde_users'); } } Horde_Auth-2.1.11/test/Horde/Auth/fixtures/test.passwd0000664000175000017500000000002312653661601020717 0ustar janjanuser:3U6GxZSGmKPGA Horde_Auth-2.1.11/test/Horde/Auth/Unit/Sql/Pdo/SqliteLockTest.php0000664000175000017500000000105712653661601022477 0ustar janjancreate(); parent::setUpBeforeClass(); } catch (Horde_Test_Exception $e) { self::$reason = 'Sqlite not available.'; } } } Horde_Auth-2.1.11/test/Horde/Auth/Unit/Sql/Pdo/SqliteTest.php0000664000175000017500000000105112653661601021660 0ustar janjancreate(); parent::setUpBeforeClass(); } catch (Horde_Test_Exception $e) { self::$reason = 'Sqlite not available.'; } } } Horde_Auth-2.1.11/test/Horde/Auth/Unit/Sql/Base.php0000664000175000017500000000524012653661601017713 0ustar janjanget('data_dir', null, 'pear.horde.org') . '/Horde_Auth/migration'; error_reporting(E_ALL | E_STRICT); } self::$migrator = new Horde_Db_Migration_Migrator( self::$db, null, array('migrationsPath' => $dir, 'schemaTableName' => 'horde_auth_schema_info')); self::$migrator->up(); self::$auth = new Horde_Auth_Sql(array('db' => self::$db, 'encryption' => 'plain')); // Don't rely on auth->addUser as this is the unit under test $row = "INSERT INTO horde_users VALUES ('mozilla', 'liketokyo', NULL, NULL);"; self::$db->execute($row); $row = "INSERT INTO horde_users VALUES ('konqui', 'kde', NULL, NULL);"; self::$db->execute($row); $row = "INSERT INTO horde_users VALUES ('tux', 'fish', NULL, NULL);"; self::$db->execute($row); } public static function tearDownAfterClass() { if (self::$migrator) { self::$migrator->down(); } if (self::$db) { self::$db->disconnect(); self::$db = null; } parent::tearDownAfterClass(); } public function setUp() { if (!self::$db) { $this->markTestSkipped(self::$reason); } } public function testAuthenticate() { $this->assertTrue(self::$auth->authenticate('tux', array('password' => 'fish'))); } public function testListUsers() { $resultUnsorted = self::$auth->listUsers(); sort($resultUnsorted); $this->assertEquals(array('konqui', 'mozilla', 'tux'), $resultUnsorted); } public function testListUsersWithSorting() { $this->assertEquals(array('konqui', 'mozilla', 'tux'), self::$auth->listUsers(true)); } public function testLockCapability() { $this->assertFalse(self::$auth->hasCapability('lock')); } public function testExistsReturnsTrueForPresentUser() { $this->assertTrue(self::$auth->exists('konqui')); } public function testExistsReturnsFalseForMissingUser() { $this->assertFalse(self::$auth->exists('beasty')); } } Horde_Auth-2.1.11/test/Horde/Auth/Unit/Sql/Locks.php0000664000175000017500000000636412653661601020124 0ustar janjan $lockMigrationsPath, 'schemaTableName' => 'horde_lock_schema_info')); self::$locksMigrator->up(); self::$locks = new Horde_Lock_Sql(array('db' => self::$db)); self::$auth = new Horde_Auth_Sql(array('db' => self::$db, 'encryption' => 'plain', 'lock_api' => self::$locks )); } public function setUp() { if (!class_exists('Horde_Db')) { $this->markTestSkipped('The Horde_Db package is not installed!'); } if (!class_exists('Horde_Lock')) { $this->markTestSkipped('The Horde_Lock package is not installed!'); } if (self::$skip) { $this->markTestSkipped(self::$skip); } if (!self::$db) { $this->markTestSkipped(self::$reason); } else { // portability: use DELETE because SQLite has no truncate $sql = "DELETE FROM horde_locks"; self::$db->execute($sql); } } public function testAuthenticate() { $this->assertTrue(self::$auth->authenticate('tux', array('password' => 'fish'))); } public function testLockUserOnceWorks() { self::$auth->lockUser('konqui'); } /** * @expectedException Horde_Auth_Exception */ public function testLockUserTwiceFails() { self::$auth->lockUser('konqui'); self::$auth->lockUser('konqui'); } public function testLockCapability() { $this->assertTrue(self::$auth->hasCapability('lock')); } public function testLockedUserReportsAsLocked() { self::$auth->lockUser('konqui'); $this->assertTrue(self::$auth->isLocked('konqui')); } public function testLockedUserCannotLogin() { self::$auth->lockUser('konqui'); $this->assertFalse(self::$auth->authenticate('konqui', array('password' => 'kde'))); } public function testUnlockUnlockedDoesNotThrowException() { self::$auth->unlockUser('konqui'); self::$auth->unlockUser('konqui'); self::$auth->unlockUser('konqui'); } } Horde_Auth-2.1.11/test/Horde/Auth/Unit/AuthTest.php0000664000175000017500000000204512653661601020043 0ustar janjan * @license http://www.horde.org/licenses/lgpl21 LGPL-2.1 * @link http://pear.horde.org/index.php?package=Auth */ class Horde_Auth_Unit_AuthTest extends Horde_Auth_TestCase { /** * @dataProvider getCredentials */ public function testGetSalt($encryption, $password, $salt) { $this->assertEquals($salt, Horde_Auth::getSalt($encryption, $password, 'foobar')); } /** * @dataProvider getCredentials */ public function testGetCryptedPassword($encryption, $password, $salt, $show_encryption = false) { $this->assertEquals($password, Horde_Auth::getCryptedPassword('foobar', $password, $encryption, $show_encryption)); } } Horde_Auth-2.1.11/test/Horde/Auth/Unit/KolabTest.php0000664000175000017500000000537712653661601020205 0ustar janjan * @license http://www.horde.org/licenses/lgpl21 LGPL-2.1 * @link http://pear.horde.org/index.php?package=Auth */ class Horde_Auth_Unit_KolabTest extends Horde_Auth_TestCase { public function setUp() { if (!interface_exists('Horde_Kolab_Session')) { $this->markTestSkipped('The Kolab_Session package is apparently not installed (Interface Horde_Kolab_Session is unavailable).'); } $this->kolab = $this->getMock('Horde_Kolab_Session'); $this->driver = new Horde_Auth_Kolab(array('kolab' => $this->kolab)); } public function testAuthenticate() { $this->kolab->expects($this->once()) ->method('connect') ->with('user', array('password' => 'password')) ->will($this->returnValue(null)); $this->assertTrue($this->driver->authenticate('user', array('password' => 'password'))); } public function testBadLogin() { $this->kolab->expects($this->once()) ->method('connect') ->with('user', array('password' => 'incorrect')) ->will($this->throwException(new Horde_Kolab_Session_Exception_Badlogin())); try { $this->driver->authenticate('user', array('password' => 'incorrect')); } catch (Horde_Auth_Exception $e) { $this->assertEquals(Horde_Auth::REASON_BADLOGIN, $e->getCode()); } } public function testFailure() { $this->kolab->expects($this->once()) ->method('connect') ->with('user', array('password' => '')) ->will($this->throwException(new Horde_Kolab_Session_Exception())); try { $this->driver->authenticate('user', array('password' => '')); } catch (Horde_Auth_Exception $e) { $this->assertEquals(Horde_Auth::REASON_FAILED, $e->getCode()); } } public function testUidRewrite() { $this->kolab->expects($this->once()) ->method('connect') ->with('user', array('password' => 'password')) ->will($this->returnValue(null)); $this->kolab->expects($this->once()) ->method('getMail') ->will($this->returnValue('user@example.com')); $this->driver->authenticate('user', array('password' => 'password')); $this->assertEquals( 'user@example.com', $this->driver->getCredential('userId') ); } } Horde_Auth-2.1.11/test/Horde/Auth/Unit/PasswdTest.php0000664000175000017500000000177212653661601020411 0ustar janjan * @license http://www.horde.org/licenses/lgpl21 LGPL-2.1 * @link http://pear.horde.org/index.php?package=Auth */ class Horde_Auth_Unit_PasswdTest extends Horde_Auth_TestCase { public function setUp() { $this->driver = new Horde_Auth_Passwd( array('filename' => __DIR__ . '/../fixtures/test.passwd') ); } public function testAuthenticate() { $this->assertTrue($this->driver->authenticate('user', array('password' => 'password'))); } public function testListUsers() { $this->assertEquals(array('user'), $this->driver->listUsers()); } } Horde_Auth-2.1.11/test/Horde/Auth/AllTests.php0000664000175000017500000000013212653661601017111 0ustar janjanrun(); Horde_Auth-2.1.11/test/Horde/Auth/Autoload.php0000664000175000017500000000060312653661601017131 0ustar janjan * @license http://www.horde.org/licenses/lgpl21 LGPL-2.1 * @link http://pear.horde.org/index.php?package=Auth */ /** Load the basic test definition */ require_once __DIR__ . '/TestCase.php'; Horde_Auth-2.1.11/test/Horde/Auth/bootstrap.php0000664000175000017500000000014312653661601017375 0ustar janjan ../../../lib Horde_Auth-2.1.11/test/Horde/Auth/TestCase.php0000664000175000017500000000460612653661601017103 0ustar janjan * @license http://www.horde.org/licenses/lgpl21 LGPL * @link http://pear.horde.org/index.php?package=Auth */ class Horde_Auth_TestCase extends Horde_Test_Case { public function getCredentials() { return array( array('aprmd5', '$apr1$11CBbKXP$AvvMGBjr81bC/NSMZIxrG.', '11CBbKXP'), array('crypt', '8e3IWstJmsmxs', '8e'), array('crypt-blowfish', '$2a$08$xJOYeQ7koDohq69yZeFXNO5TvrTlFLs4NP2..EcZP57oeOVgXoxqy', '$2a$08$xJOYeQ7koDohq69yZeFXNO'), array('crypt-des', '45MibW6/G3XEY', '45'), array('crypt-md5', '$1$537a3a0e$CWyLVJdQKfxbKPBv/Efzm0', '$1$537a3a0e$'), array('md5-base64', 'OFj2IjCsPJFfMAxmQxLGPw==', ''), array('md5-hex', '3858f62230ac3c915f300c664312c63f', ''), array('msad', "\"\0f\0o\0o\0b\0a\0r\0\"\0", ''), array('mysql', '*9B500343BC52E2911172EB52AE5CF4847604C6E5', ''), array('plain', 'foobar', ''), array('sha', 'iEPX+SQWIR3p67lj/0zigSWTKHg=', ''), array('smd5', 'ISCNJwzwP30CadahjpkbL2l6bHJxd2h2', 'izlrqwhv'), array('smd5', '{SMD5}ISCNJwzwP30CadahjpkbL2l6bHJxd2h2', 'izlrqwhv', true), array('smd5', 'bn3EnZ0TFc+yyx3KotqS5GlydmM=', 'irvc'), array('smd5', 'GZ4KWKk2W6eSOHjVXLhOOzADuwA=', hex2bin('3003bb00')), array('smd5', '6y2n+CGCZhuB32dyFu3keQtY0Vc=', hex2bin('0b58d157')), array('ssha', 'buQrQ9vazjrHtO6oIfSZhSBjVxdjemZvZHVubg==', 'czfodunn'), array('ssha', 'BLDmpxHYTH2/Bmg4veVfbglU68jQKEuK', hex2bin('d0284b8a')), array('ssha', '2iXr83rPabLxmrx7uulT4W7mJFrawT41', hex2bin('dac13e35')), array('ssha', '{SSHA}6IeOcols85dHJeTHevA356ruftrA2PRX', hex2bin('c0d8f457'), true), array('ssha', '6IeOcols85dHJeTHevA356ruftrA2PRX', hex2bin('c0d8f457')), array('ssha256', '{SSHA256}wnD9GBo+WIXZ+bVD7DjoDokQBjkVgtufXyBh1EqfXn11+sUG', hex2bin('75fac506'), true), array('ssha256', 'wnD9GBo+WIXZ+bVD7DjoDokQBjkVgtufXyBh1EqfXn11+sUG', hex2bin('75fac506')), ); } }