Commit Graph

92 Commits

Author SHA1 Message Date
Gabriele C
75b3a571e1 Always specify Locale on toLowerCase and toUpperCase usages, fixes AuthMe not working correctly on machines with turkish locale. ('I'.toLowerCase() => 'ı') 2022-08-20 04:41:04 +02:00
ljacqu
6be9cec16e #2413 Always use ArrayList for LimboPlayer groups to prevent issue with Gson 2021-10-09 15:08:20 +02:00
David Maes
d969d314b3
LuckPerm: keep contexts active after reload of groups (#2186)
* Use context aware groups

* Revert "Use context aware groups"

This reverts commit 5adc6ef7

* Keep luckperm contexts after authentication

* Code cleanup

* Code cleanup

* Fix nullpointer for context maps

* Code cleanup

* Use uuids for sqlite and postgresql

* Revert "Use uuids for sqlite and postgresql"

This reverts commit 05296e5f23.

* Cleanup imports

* Fix test

Co-authored-by: David Maes <david.maes@kbc.be>
2021-08-21 22:19:45 +02:00
Andrea Cavalli
3393d989d9
Fix java 16 compatibility issue (#2342) 2021-05-26 21:40:59 +02:00
Hex3l
b1e9b43294
adds proxy sessions, fixing auto login from bungee messages issues (#2285) 2021-03-15 02:49:45 +01:00
ljacqu
e31cb5bb9e Fix some CodeClimate issues
- Mostly missing Javadoc on methods & line length violations
2019-11-03 10:54:43 +01:00
Gabriele C
48357831cd
Revert "Packet based movement freeze (#1879)" (#1882)
This reverts commit db3acce70c.
2019-08-07 10:49:23 +02:00
Gabriele C
db3acce70c Packet based movement freeze (#1879)
* Remove unused files
* Remove walk/fly speed from limbo player
* Implement packet based movement freeze
2019-08-07 06:47:00 +02:00
ljacqu
c34f00f759 #1874 Introduce individual ConsoleLogger instance per class (#1875)
* #1874 Introduce individual ConsoleLogger instance per class
- Create ConsoleLoggerFactory from which a separate logger can be created for each class
- Allows to support individual log level settings in the future

* Fix CodeStyle issue

* Replace full class name with import

* Update usages after merge from master
2019-08-06 15:15:16 +02:00
Alexandre Vanhecke
254d4d75a2 Add optional column for players uuids (#1840) 2019-08-06 15:13:13 +02:00
ljacqu
d1b6161687 Minor: print stack trace if AuthMe is disabled due to exception, remove unused imports 2019-06-17 22:47:15 +02:00
Gabriele C
427251a4f3 Actually support 1.8 servers 2018-12-02 00:28:14 +01:00
Gabriele C
d89f8e0e66 Fix build 2018-11-30 14:47:08 +01:00
ljacqu
58e04556ee Checkstyle: Add 'WhitespaceAfter' check, fix some violations 2018-09-01 08:38:14 +02:00
Gabriele C
b1c322c60c
Add #1591 debug code (#1599) 2018-07-16 14:49:35 +02:00
ljacqu
8e4288f911 Minor code householding 2018-05-20 13:10:26 +02:00
ljacqu
729c567dd5 #1141 Check that user is logged in before changing TOTP key
- Use PlayerCache to check that user is logged in where appropriate
- Add log statements
2018-05-13 18:49:40 +02:00
ljacqu
6f2f7a73af Merge branch 'master' of https://github.com/AuthMe/AuthMeReloaded into 1141-optional-additional-2fa-auth 2018-05-01 22:49:23 +02:00
ljacqu
ecaffbabfc Small cleanups / changes amassed over time
- Small javadoc fixes
- Simplifications
- Move logException method from StringUtils to ExceptionUtils
2018-04-22 12:45:34 +02:00
ljacqu
de0e588cf3 Merge branch 'master' of https://github.com/AuthMe/AuthMeReloaded into 1141-optional-additional-2fa-auth 2018-04-22 07:14:05 +02:00
Tony
1f9bf38755 Added EmailChangedEvent (#1549)
* Added EmailChangedEvent

* Fix failing tests

Silly.

* Documented the EmailChangedEvent

* Separate messages for cancelled email event

* Added lang todos for all the languages I can't speak

I wish I could though.

* Checkstyle satisfaction

* Changed log level to info for cancelled events
2018-04-03 17:45:27 +02:00
ljacqu
2bf78dd186 Merge branch 'master' of https://github.com/AuthMe/AuthMeReloaded into 1141-optional-additional-2fa-auth 2018-04-02 23:44:19 +02:00
ljacqu
4595a14191 #1539 Add support for columns that are not on player auth (is_logged, has_session) 2018-03-25 11:52:40 +02:00
ljacqu
e9ab82db6b #1141 Make 2fa messages translatable, various cleanups (null safety, ...) 2018-03-21 23:56:13 +01:00
ljacqu
f66a8a5b06 Merge branch 'master' of https://github.com/AuthMe/AuthMeReloaded into 1141-optional-additional-2fa-auth
# Conflicts:
#	src/main/java/fr/xephi/authme/permission/PlayerPermission.java
#	src/main/java/fr/xephi/authme/service/BukkitService.java
2018-03-20 23:07:25 +01:00
ljacqu
495cfc69a9 #1141 Move TOTP code during login as separate step: /2fa code
Rough version.
- Introduces a limbo player state on the LimboPlayer, allowing us to add further mandatory actions between successful (password) authentication and the ability to play on the server
2018-03-20 23:06:08 +01:00
HexelDev
84f97ea1c2 Add QuickCommandsProtectionManager#processJoin(player) 2018-03-19 22:33:53 +01:00
ljacqu
af6bee59bd Merge branch 'master' of https://github.com/AuthMe/AuthMeReloaded into 1141-optional-additional-2fa-auth
# Conflicts:
#	src/main/java/fr/xephi/authme/datasource/MySQL.java
2018-03-19 22:32:16 +01:00
HexelDev
55b6f67550 JavaDocs 2018-03-15 20:20:40 +01:00
HexelDev
d2fbf12c3c Merge branches '642-kick-on-fast-commands' and 'master' of https://github.com/AuthMe/AuthMeReloaded into 642-kick-on-fast-commands 2018-03-15 19:47:11 +01:00
ljacqu
1a53cd11b2 #829 Move CommandSender / name to first argument to avoid confusion with varargs
- Overloaded method with (String, String...) as args was problematic as it could be confusing on its own and also confusing with the (CommandSender, String...) flavor
2018-03-10 16:58:30 +01:00
Maxetto
bc4cb5046d Fix yet another build 2018-03-07 19:29:24 +01:00
HexelDev
844bd24221 Fixed minor code issues 2018-03-05 21:00:24 +01:00
ljacqu
9954c82cb6 #1141 Add TOTP key field to database and PlayerAuth
- Add new field for storing TOTP key
- Implement data source methods for manipulation of its value
2018-03-05 19:50:58 +01:00
Maxetto
00de15016a Follow remarks
#1509
2018-03-05 19:38:24 +01:00
HexelDev
c0e1b8082f #642 - Quick Command Protection manager 2018-03-04 17:32:16 +01:00
ljacqu
23c246748a #930 Register captcha: avoid circular dependency by handling limbo message in captcha command
- Set limbo message in captcha command (as is done for login captcha)
- Add clarifying comments to captcha command
- Remove classes handling circular dependencies
2018-01-06 19:04:03 +01:00
ljacqu
84b376d2a5 #930 Change captcha storage to change code internally upon failure
- Within CaptchaStorage#checkCode, a player's captcha code is overridden with a new one on failure or cleared on success
- Fixes inconsistencies in the retrieval / regeneration of codes
2018-01-06 02:31:26 +01:00
ljacqu
180bbbf0be #930 Refactor captcha managers to have a crude captcha storage class instead of inheritance
- Remove abstract captcha manager in favor of a primitive captcha code storage (composition over inheritance)
- Supply player when checking captcha code for further usage (fixes open point from previous commit)
2018-01-05 01:26:25 +01:00
ljacqu
7cf3f6d77b #930 Registration captcha: update message shown to player on failed captcha
- Show message with new captcha code when a captcha has failed
- Requires implementation of circular dependency handler (initial draft)
2018-01-05 00:17:22 +01:00
ljacqu
1a60036592 #930 Extract common captcha functionality into abstract superclass
- Create AbstractCaptchaManager
- Add tests
2017-12-01 23:40:20 +01:00
ljacqu
33904c09e9 #930 Create registration captcha manager
- Introduce registration captcha manager, rename login captcha manager accordingly
- Integrate reg. captcha manager into /register command

Open points:
- Refactor common captcha functionality into abstract superclass
- If captcha before /register necessary, show appropriate message to player immediately
- Unit tests
2017-12-01 21:12:35 +01:00
ljacqu
67a6a42dfe Minor Javadoc fix: one "yet" is enough :) 2017-12-01 20:33:33 +01:00
ljacqu
7932c1bf90 Update to injector 1.0
- Includes Factory and SingletonStore so our custom implementation is removed
2017-11-25 21:27:18 +01:00
HexelDev
ba65633182 Email verification code (#1382)
* Base verification code implementation, must define command, manager, events
* VerificationManager, verification command and messages, handled some sensible commands, configuration values
* Improved manager and sensible commands trigger
* Updated messages
* Updated verification code manager, fixed tests
* Switched to a permission based command
* Verification manager and command improved and added tests
* Edited messages
2017-10-28 12:23:14 +02:00
Gabriele C
39647013b2 Cleanup 2017-10-23 08:36:49 +02:00
ljacqu
1651a61063 #792 #814 Implement SQLite migration, allow last IP to be nullable in MySQL
- Old SQLite setups have the last IP column as NOT NULL but without a default value. With the new concept (where we don't set a last IP on player registration) it fails.
  - Create an /authme debug child that allows to migrate SQLite (tricky because SQLite does not support dropping or modifying columns)
  - Allow last IP column to be NOT NULL in MySQL as well (extend MySQL /authme debug child)
- Add TODO comments with follow-up issue to extend our commands with new registration IP field
2017-10-21 10:45:48 +02:00
ljacqu
1df5308e56 #792 #814 Create command to remove NOT NULL constraints
- Create command under /authme debug that allows to change the 'nullable' status of MySQL columns (currently last date and email only)
   - We need to offer a default value for forum integrations that have a NOT NULL email column. Offering a command avoids us from force-migrating existing databases while still offering migrations in both directions
- Change in default value handling: lack of values are not handled by setting default values to the PlayerAuth anymore, and reading a default value from the database into a PlayerAuth will be translated into null by the PlayerAuth builder
- When a new database is created, email and lastlogin are now nullable and lack a default a value

Open points:
- Finish MySqlDefaultChangerTest
- Revise purging logic (#792)
- Allow to have more columns nullable (#814)
2017-10-15 12:56:13 +02:00
ljacqu
52d6476058 #792 Add columns for registration IP and registration date
- Add columns for reg date and IP
- Rename "ip" to "last IP"
2017-10-14 17:37:34 +02:00
ljacqu
5b1d8c6429 Use String#replace over String#replaceAll (the latter uses regex) 2017-10-08 17:32:05 +02:00