Commit Graph

48 Commits

Author SHA1 Message Date
Hugues Peccatte
7f304c1154 Remove useless proxies
Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>
2019-01-12 23:39:19 +01:00
Hugues Peccatte
68b88d0537 Remove useless variables before return
Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>
2019-01-12 01:33:22 +01:00
Maurício Meneghini Fauth
23c3579804 Format array declarations
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2019-01-07 14:31:39 -02:00
Maurício Meneghini Fauth
4cee0cbc12 Adds space after not (!) and type cast
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2019-01-05 21:56:34 -02:00
Maurício Meneghini Fauth
999b4d14f0 Fix some coding standard errors
- Fixes array identation
- Removes empty statements

Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2019-01-05 21:25:08 -02:00
Maurício Meneghini Fauth
3a7e1503ac Fix some coding standard errors
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2019-01-04 19:42:10 -02:00
Maurício Meneghini Fauth
ef5d7dd66b Use Bootstrap buttons component
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-12-21 01:01:12 -02:00
Maurício Meneghini Fauth
9eba565bf4 Remove unnecessary HTML closing tags
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-12-19 00:12:54 -02:00
William Desportes
cc2665121d
phpstan level 2 - fixes
Signed-off-by: William Desportes <williamdes@wdes.fr>
2018-11-25 13:57:57 +01:00
Lakshay arora
9d2ebe7b79 Fix tests, remove use of cookie pmaUserHashed.
Signed-Off-By: Lakshay arora <arora.lakshya123@gmail.com>
2018-08-06 16:39:33 +05:30
Lakshay arora
a16959071c Apply suggested changes.
Signed-Off-By: Lakshay arora <arora.lakshya123@gmail.com>
2018-07-12 12:53:13 +05:30
Lakshay arora
53c85c7bd8 Fix a minor bug and optimize script reload
Signed-Off-By: Lakshay arora <arora.lakshya123@gmail.com>
2018-07-12 12:53:13 +05:30
Lakshay arora
5fd4a006ee Login modal after session expiration
Signed-Off-By: Lakshay arora <arora.lakshya123@gmail.com>

Signed-Off-By: Lakshay arora <arora.lakshya123@gmail.com>
2018-07-12 12:53:13 +05:30
Lakshay arora
f05bce1e94 Some minor bug fixes
Signed-Off-By: Lakshay arora <arora.lakshya123@gmail.com>
2018-07-12 12:53:13 +05:30
Lakshay arora
568bc133cb Some other bug fixes
Signed-Off-By: Lakshay arora <arora.lakshya123@gmail.com>
2018-07-12 12:53:13 +05:30
Lakshay arora
aae6ff4424 First implementation. To be tested
Signed-Off-By: Lakshay arora <arora.lakshya123@gmail.com>
2018-07-12 12:53:13 +05:30
Maurício Meneghini Fauth
244d4e8e81 Replace Template::get calls in libraries/classes
Uses Template::render() instead of Template::get().

Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-06-18 18:18:24 -03:00
Maurício Meneghini Fauth
285e38e931 Fix some PSR-2 coding standard errors
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-05-30 09:07:56 -03:00
Maurício Meneghini Fauth
b9c0463d96 Use short array syntax instead of long array syntax
Replaces array() with [].

Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-05-30 01:42:21 -03:00
Maurício Meneghini Fauth
0998a50e9e Enable strict mode in Plugins classes
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-05-16 01:09:16 -03:00
Maurício Meneghini Fauth
65c5a13deb Remove hash_equals polyfill
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-04-13 02:33:10 -03:00
Maurício Meneghini Fauth
d23ed47666 Refactor PhpMyAdmin\IpAllowDeny static methods
Replaces static methods with instance methods.

Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-04-03 14:06:13 -03:00
Anu4ruby
5efb29d500 Removed inline styles from AuthenticationConfig.php file-issue 12262 (#13979)
* removed inline styles from AuthenticationConfig.php file-issue 12262

* removed inline styles from AuthenticationConfig.php- file-issue 12262-

Signed-off-by: Anupama V <sadicarnot@gmail.com>
2018-02-09 19:34:32 -02:00
Gabriel Caruso
6ff73257e2 Simplify returns
Signed-off-by: Gabriel Caruso <carusogabriel34@gmail.com>
2018-01-16 10:16:56 -02:00
Michal Čihař
8885328bbe Merge branch 'QA_4_7' 2018-01-08 17:00:35 +01:00
Michal Čihař
0a1634a12b Warn user in case the failed login is result of failed setting of cookie
This can easily happen when switching between HTTPS and HTTP - once you
login using HTTPS, the secure cookie is created and it can not be
overwritten by non secure one created on HTTP connection making the
browser stuck on wrong session ID.

Issue #13872

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-12-18 11:35:44 +01:00
Gabriel Caruso
a8bd364e02 Clean elses
Signed-off-by: Gabriel Caruso <carusogabriel34@gmail.com>
2017-12-14 22:02:17 -02:00
Maurício Meneghini Fauth
01fd301003 Use 'elseif' keyword istead of 'else if'
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2017-12-04 13:31:25 -02:00
Michal Čihař
6aeae463d1 Merge branch 'QA_4_7' 2017-11-29 09:44:46 +01:00
Michal Čihař
a8f358e2c6 Merge branch 'QA_4_7' 2017-11-29 09:21:53 +01:00
Michal Čihař
49a1b0e743 Move session cleanup to post login
It was really misplaced in 951e8ac753
it did cleanup session with every request.

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-11-27 13:14:58 +01:00
Michal Čihař
951e8ac753 Consistent session handling across plugins
We want all auth plugins to behave same, there is no reason to secure
session only in the cookie plugin.

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-11-27 09:14:52 +01:00
Michal Čihař
0ccaf0ac91 Use templates for rendering header and footer of login page
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-10-30 14:40:44 +01:00
Michal Čihař
579b1275cf Move login page response logic to the Response class
It really more belongs there and might be easier reused.

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-10-30 14:24:07 +01:00
Michal Čihař
6619fe9196 Check return value from cookieDecrypt
This can return false and we should fail early once this happens.

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-10-20 19:44:28 +02:00
Michal Čihař
6cb2963dcf Fix createIV documentation
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-10-20 19:44:28 +02:00
Michal Čihař
8e8f4bd3bb Avoid using PHP_AUTH_USER and PHP_AUTH_PW globals for auth
Use object attributes to store the actual credentials and avoid
messing up with global variables.

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-10-20 19:44:28 +02:00
Michal Čihař
62535ea5b9 Pass failure reason to showFailure
This way we can avoid relying on global variables to check it.

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-10-20 19:44:28 +02:00
Michal Čihař
026d722178 Rationalize AuthenticationPlugin API
Make the API more consistent, remove not needed auth prefix and stop
talking about advanced authentication which has been there about 10
years ago.

API changed:

- authCheck is now readCredentials
- authSetUser is now storeCredentials
- auth is now showLoginForm
- authFails is now showFailure
- storeUserCredentials is now rememberCredentials

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-10-20 18:14:56 +02:00
Michal Čihař
13d2ff1f5b Consistely use no return value for AuthenticationPlugin::authFails
It really does not return in the end, so make the docs consistent
with the code.

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-10-20 18:14:56 +02:00
Michal Čihař
56c1c9fc5c Share base code for AuthenticationPlugin::authSetUser
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-10-20 18:14:56 +02:00
Michal Čihař
63bae14110 Make some checks on variables more robust
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-10-02 16:18:21 +02:00
Michal Čihař
d2d32651bc Replace empty() by strlen()
In order to fix operation with database or table called 0.

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-10-02 15:53:44 +02:00
Maurício Meneghini Fauth
99642bf6e2 Refactor select_server functions to static methods
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2017-09-12 23:12:28 -03:00
Maurício Meneghini Fauth
0e47bd11e0 Merge pull request #13534 from mauriciofauth/session
Add Session class
2017-08-01 09:16:57 -03:00
Michal Čihař
4a83171c30 Merge branch 'QA_4_7' 2017-08-01 09:09:19 +02:00
Maurício Meneghini Fauth
bed21bc30c Move session.*.php to Session class
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2017-07-31 20:43:22 -03:00
Maurício Meneghini Fauth
2631bcedba Move plugins classes to PhpMyAdmin namespace
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2017-07-20 11:50:12 -03:00