Commit Graph

243 Commits

Author SHA1 Message Date
37ff2261e7 correctly handle usergroups array 2015-07-18 12:58:42 +02:00
e6c4392f11 Fix scrutinizer issues with auth 2015-05-07 01:43:32 -04:00
db9faf025c Report more meaningful errors when an auth backend fails. closes #1093 2015-05-06 01:30:59 -04:00
79e7937762 Remove error supression for file_exists()
In an older version of PHP a file_exists() call would issue a warning
when the file did not exist. This was fixed in later PHP releases. Since
we require PHP 5.3 now, there's no need to supress any error here
anymore. This might even give a minor performance boost.
2015-01-07 10:47:45 +01:00
8702de7f7e Merge remote-tracking branch 'origin/master' into scrutinizerissues
Conflicts:
	inc/media.php
	inc/plugin.php
	inc/template.php
	lib/plugins/authplain/_test/escaping.test.php
	lib/plugins/syntax.php
2014-12-09 17:26:28 +01:00
60aca4b904 do not use Accept-Encoding in browser UID
Since Chrome 37, they send differen accept encodings for POST and GET
requests which will break BrowserUID checks as reported in
cosmocode/dokuwiki-plugin-oauth/issues/3

See https://code.google.com/p/chromium/issues/detail?id=410559 for
official bug report at Google
2014-10-06 14:59:03 +02:00
7e8500eea1 PHPDocs and some improvements 2014-10-02 14:55:24 +02:00
42ea7f447f Many PHPDocs, some unused and dyn declared vars
many PHPDocs
some unused variables
some dynamically declared variables declared
2014-10-01 11:30:27 +02:00
59bc3b48fd more scrutinizer issue improvements 2014-09-29 21:45:27 +02:00
3df1d4a6fe Merge pull request #868 from splitbrain/authclean
clean user credentials from control chars
2014-09-27 12:39:46 +02:00
7b950f2d59 Merge remote-tracking branch 'origin/auth_getUserData_improvements'
* origin/auth_getUserData_improvements:
  KISS - remove class constants for REQUIRE_GROUPS & IGNORE_GROUPS and replace with boolean values
  use $requireGroups constants in auth classes; comments; code improvements
  fix comment errors, sp. & grammar
  code styling - add missing braces
  Allow user info to be retrieved without groups
  Restore correct public interface of getUserData() for authldap plugin

Conflicts:
	inc/common.php
2014-09-26 11:31:13 +02:00
5e9e105404 do not allow empty passwords
When a username but no password is submitted, the login is denied right
away instead of relying on the backend to refuse the login.
2014-09-26 10:36:05 +02:00
395c2f0ff3 clean user credentials from control chars
This is to prevent zero byte attacks on external auth systems as
described in
http://www.freelists.org/post/dokuwiki/Fwd-Dokuwiki-maybe-security-issue-Null-byte-poisoning-in-LDAP-authentication
2014-09-23 20:17:49 +02:00
e5204a127e Added @ALL handeling in auth_isMember 2014-07-30 16:39:40 +02:00
49cd1ed0c3 fix AUTH_USER_CHANGE event in profile updates
the triggered event did not allow event handlers to change the passed
data
2014-07-26 08:40:27 +02:00
2dc9e90007 KISS - remove class constants for REQUIRE_GROUPS & IGNORE_GROUPS and replace with boolean values 2014-05-04 19:20:11 +01:00
2046a6546c Allow user info to be retrieved without groups
Some parts of dokuwiki (e.g. recent changes, old revisions) can
requests lots of user info (to provide editor names) without
requiring any group information.

This change also implements caching of user info by authmysql &
authpgsql plugins to avoid repeated querying of the DB to retrieve
the same user information.
2014-03-12 17:47:43 +00:00
585bf44e2b amend $_SERVER to $INPUT->server 2014-03-06 19:55:56 +00:00
f87b5dbbba use isset() + ?: or error suppression where value may not be set 2014-03-05 22:04:14 +00:00
55a71a16cb removed pre PHP 5.2 code wrt setcookie and session setting
- moved cookiedir determination in the if-statement
2014-03-04 21:14:24 +01:00
04d68ae4ed PHPDocs auth.php 2014-02-20 14:08:02 +01:00
c17acc9f11 AUTH_ACL_CHECK event around ACL checking
allows to modify ACL results in the AFTER event or to implement a
completely different ACL mechanism in the BEFORE event.
2014-01-05 19:09:34 +01:00
21c3090a76 replace \s, \S with [ \t], [^ \t] in regexs used with acls 2013-10-21 23:32:15 +01:00
443e135d59 replace boolean conditional checks on possibly uninitialized vars with \!empty/empty/isset as appropriate 2013-10-16 22:04:01 +01:00
30f6faf006 update for deprecated '/e' flag in preg_replace (php 5.5) 2013-10-16 15:22:58 +01:00
2f7a0e94ca Fix CodeSniffer whitespace violoations
Removed extraneous whitespace to eliminate errors reported by the
Squiz.WhiteSpace.SuperfluousWhitespace sniff.
2013-09-10 22:17:43 -07:00
7ef8e99fe6 Fix CodeSniffer violations
Change indentation to ensure code confirms to CodeSniffer rules.
2013-08-22 01:01:41 -07:00
b8983d3a45 Fix CodeSniffer violations
Remove whitespace from end of lines to reduce the number of CodeSniffer
violations.
2013-08-20 21:18:30 -07:00
ad3d68d738 Fix a couple of bugs in ACL substitution mechanism
- %GROUP% & %USER% can now both be used in the same rule, e.g.

%GROUP%:%USER%    2

- rules with tokens will be skipped when the user is not logged in
  previously %USER% was attempted
2013-08-03 14:04:06 +02:00
836a176267 Merge branch 'FS#2751' of git://github.com/splitbrain/dokuwiki into pull-request-245
* 'FS#2751' of git://github.com/splitbrain/dokuwiki:
  coding corrections. correct type hint, remove unused variable assignment
  de/de-informal: localization updates (delete user function)
  unit tests for self deleting of user accounts
  FS#2751 - self deletion of user account
2013-08-02 21:49:24 +02:00
73012efd96 coding corrections. correct type hint, remove unused variable assignment 2013-08-02 17:57:07 +02:00
20587314b0 Merge pull request #246 from splitbrain/profileform_improvements
HTML5isation of some forms
2013-07-31 11:11:25 -07:00
71422fc898 Change error message shown for incorrect current password on update profile form.
The current message confusingly mentions bad 'username' when username is not involved.  The
new message is the same as that introduced for an incorrect current password on the self
delete profile form (FS#2751)
2013-07-31 18:41:02 +02:00
2a7abf2d7f FS#2751 - self deletion of user account 2013-07-31 18:14:26 +02:00
7b650cef79 auth_en/decrypt: Add explanation and more efficient decryption
Added an explanation that what we do is like normal CBC but that we
additionally encrypt the IV which is actually suggested by the NIST for
non-random (but unique) IVs. In the decryption process it's not
necessary to decrypt the IV, this should save some time.
2013-07-31 11:56:58 +02:00
8269996a43 auth_random: remove exception comment as there is no exception 2013-07-31 11:56:16 +02:00
04369c3eae Add AES from phpseclib and use it for cookie encryption
This replaces the deprecated and broken Blowfish implementation that has
previously been used and should provide a lot more security.
2013-07-30 18:55:19 +02:00
30d544a4c3 Use a new, truly random secret for cookie encryption 2013-07-30 18:55:19 +02:00
27058a053e Fix and add type declarations for the auth system 2013-07-30 18:55:18 +02:00
483b6238a3 Add truly random numbers and use them in places where randomness matters 2013-07-30 18:55:18 +02:00
ea2272c40a removed tabs 2013-06-16 21:58:08 +02:00
987c8d26bb Increased strength of auto generated passwords a bit
If you want better random initialization and more control over the
password strength install the passpolicy plugin.
2013-06-14 14:49:39 +02:00
d628dcf33c fixed syntax fuckup 2013-06-09 02:51:19 +02:00
8a285f7fa7 AUTH_PASSWORD_GENERATE event added
This is needed to replace the password generator by a plugin
implementation. Related to PR #166 and FS#2147
2013-06-09 02:29:27 +02:00
183a7b8845 make password reset token completely random
No need for HMAC here because there's no length attack vector here. We
only care for the existance of the file and each reset request is
completely (random) independent from each other.
2013-05-31 14:43:31 +02:00
8fcfc7abfd use HMAC in password reset token FS#2794 2013-05-31 09:29:08 +02:00
a91f1103e6 fixed wrong use of quotes in authtype warning message 2013-05-27 16:39:54 +01:00
98e31f853f Fix wrong config key in deprecated auth message 2013-05-15 16:51:44 +02:00
0b2e0a720d restrict 'authtype deprecated' alert to superusers only 2013-04-01 17:03:25 +01:00
e71b0ef705 backward compatibility for old authtype settings 2013-03-17 19:22:37 +01:00