Commit Graph

2883 Commits

Author SHA1 Message Date
Gabriele C
3a690fd79a Change how we detect spigot #1531 2018-03-19 17:23:51 +01:00
Gabriele C
aab5d71efd Update sponsort details 2018-03-19 16:53:11 +01:00
games647
f33446ee25 Migrate to GEO IP 2 (Related #1471) (#1529)
* Migrate to GEO IP 2, because support will drop in April

* Change all links of maxmind to https
* Update maxmind database dependency and add javatar to extract
the database from the tar archive
(now only a small difference in jar file size -> ~80KB smaller)
* Verify downloaded archive using MD5 (There are no other checksums available)
* Migrate to Java NIO instead of old java file I/O (Feedback?)
* Internal Optional usage for nullable values (Feedback?)

Minor:
* Schedule a Bukkit async task instead of creating a thread manually
* Validate ip input string
* Extract validation into single method
* Close all resources safely using try-resources

* More https links

* Add documentation

* Set the same last modification as in the tar archive

* Fix tests

* Comment how the legacy API responded to unknown entries

* Document missing function param

* Document our maxmind dependency modifications

* Include time unit into constant

* More logging for downloading the database

* Add missing return if the database cannot be found

* Delete temporarily file after working with it
2018-03-17 03:00:24 +01:00
HexelDev
7790fa5796 typo 2018-03-15 21:53:27 +01:00
HexelDev
f5efd4bf23 Updating plugin.yml 2018-03-15 21:45:23 +01:00
HexelDev
66d1ee92c3 QuickCommandsProtectionManager Test class 2018-03-15 21:45:11 +01:00
HexelDev
900e8f2415 Updated messages 2018-03-15 21:44:49 +01:00
HexelDev
048a47ce6e Fixing PLayerListener kick message/tests 2018-03-15 21:43:36 +01:00
games647
7ff5801cfe
Revert "Fix no auto login permission (Fixes #118)" Wrong repo
This reverts commit 6d60e72296.
2018-03-15 20:43:50 +01:00
games647
6d60e72296
Fix no auto login permission (Fixes #118) 2018-03-15 20:42:50 +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
fddb3bf265 Fix minor Checkstyle violations
- Mostly missing JavaDoc, some line lengths
2018-03-11 19:08:21 +01:00
ljacqu
ff0a7e1f89 Fix failing test 2018-03-11 16:34:25 +01:00
HexelDev
fe4d5e7c0d Saving user join and check on command 2018-03-10 19:13:23 +01:00
ljacqu
15f49dcbb3 Merge branch 'global-replacements' 2018-03-10 16:59:56 +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
ljacqu
eb9cd31a65 #1141 Split TOTP permissions for add/remove, refactor TOTP services
- Split TotpService further into GenerateTotpService and TotpAuthenticator, which wraps the GoogleAuthenticator impl
- Add missing tests for the services
- Change GenerateTotpService's interface to behave like a collection for more intuitive method behavior
2018-03-10 16:21:53 +01:00
ljacqu
e72d5d5e81 #1141 Require TOTP code to be passed with /login (temporary)
- Temporarily require the TOTP code to be provided with /login
- Future implementation should require it as a second step
2018-03-09 18:37:01 +01:00
ljacqu
c3cf9e3ee0 #1141 Rough version of TOTP commands to add and remove a code for a player 2018-03-07 20:11:53 +01:00
Maxetto
7a3e2e9f71 Use spaces instead of tabs 2018-03-07 19:37:20 +01:00
Maxetto
bc4cb5046d Fix yet another build 2018-03-07 19:29:24 +01:00
Maxetto
9b7139a17a Add Display Name tag replacement too
#1509
2018-03-07 19:08:36 +01:00
HexelDev
844bd24221 Fixed minor code issues 2018-03-05 21:00:24 +01:00
HexelDev
11d039c818 space after 'if'(s) 2018-03-05 20:20:25 +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
f9d1a3aef2 Those were not meant to be there 2018-03-05 19:42:43 +01:00
Maxetto
00de15016a Follow remarks
#1509
2018-03-05 19:38:24 +01:00
HexelDev
57809194f3 Renaming function hasValidSessionData -> fetchSessionStatus 2018-03-04 19:45:05 +01:00
HexelDev
be2c6ae116 Fixing tests 2018-03-04 19:23:08 +01:00
HexelDev
9db38a3bf4 SessionService#hasValidSessionData description update 2018-03-04 18:38:46 +01:00
HexelDev
5abc9b9d45 'session expired' message spam fix 2018-03-04 18:36:21 +01:00
HexelDev
c0e1b8082f #642 - Quick Command Protection manager 2018-03-04 17:32:16 +01:00
games647
914c4adc0b
Fix ProtocolLib services are disabling after authme reload
Using the previous else branch we would always call unregister if the feature
was enabled before.
2018-03-04 14:29:08 +01:00
Gabriele C
930f5609bf
Merge pull request #1513 from Maxetto/patch-3
Fix last commit
2018-03-02 13:43:59 +01:00
Maxetto
6c168b6b13
Fix last commit 2018-03-02 12:18:36 +01:00
Gabriele C
9f978ef53a
Merge pull request #1512 from Maxetto/patch-3
Remove VIP status to OP by default
2018-03-02 03:33:08 +01:00
Maxetto
fe075a5c60
Remove VIP status to OP by default
Closes #1040.
2018-03-01 18:04:30 +01:00
Maxetto
3541f21985
I forgot this wasn't Apache's StringUtils 2018-02-28 18:25:50 +01:00
Maxetto
2aaf58182c
Be able to replace sender name in every message
Closes #829
2018-02-28 16:18:08 +01:00
ljacqu
8d5afa7fbc Minor: Use CommonService for permission lookup
- Some changes found in a very old patch :) - drop injection of PermissionsManager in favor of CommonService
- Rename IsEqualByReflectionMatcher's method to something more specific to differentiate it better from Hamcrest's equalTo() matcher
2018-02-23 23:37:24 +01:00
ljacqu
329657bd5f
#1497 Show specific message for invalid YAML files (#1506)
* #1497 Throw dedicated exception for invalid YAML files and handle it on startup
- Wrap SnakeYAML exceptions when loading config.yml and commands.yml on startup into own exception type
- Handle exception type on startup with specific error message

* #1497 Fix inaccurate JavaDoc comment
2018-02-23 23:31:22 +01:00
ljacqu
7864bb06ac Minor cleanups
- Fix line length violations
- Add JavaDoc to some longer methods
- Remove unused imports
2018-02-23 23:23:24 +01:00
ljacqu
83e247afe9 Minor: Simplify check for Spigot 2018-02-17 23:23:44 +01:00
ljacqu
90400650c3 Merge branch 'master' of https://github.com/AuthMe/AuthMeReloaded into 1467-message-keys-hierarchy 2018-02-17 23:08:39 +01:00
ljacqu
9dd4039fdd #1467 Create backup before migrating; output newly added message keys
- Extract logic for creating a backup timestamp into FileUtils
2018-02-13 22:15:03 +01:00
Gabriele C
1626274e9d Try to solve #1498 2018-02-12 23:37:22 +01:00
Gabriele C
9ef5a983cc Fix #1482 2018-02-12 23:00:10 +01:00
ljacqu
ffeb04c0a2 Merge branch 'master' of https://github.com/AuthMe/AuthMeReloaded into 1467-message-keys-hierarchy
Conflicts:
	src/main/resources/messages/messages_ko.yml
2018-02-11 09:47:07 +01:00
ljacqu
189647d9f2 #1467 Fix character issues by always using UTF-8 when reading and writing
- Change usages of Bukkit's FileResource to a ConfigMe PropertyReader
- Specify UTF-8 for reading and writing
2018-02-11 09:22:42 +01:00
Adeuran
8186300349 Update messages_ko.yml (#1499)
* Update messages_ko.yml

Additional Translate by Adeuran(아몬드노란맛 http://adeuran.tistory.com)

* Some of Korean Translate to English

자동가입방지문자 -> CAPTCHA

* Update messages_ko.yml
2018-02-07 19:12:06 +01:00
sgdc3
6a5f335e16 Implement #1483 2018-02-04 15:12:23 +01:00
ljacqu
cd61febd76 #1467 Change /authme messages to only update help text file now 2018-02-02 20:12:42 +01:00
ljacqu
1d6d9eb764 #1467 Rearrange old keys migration so no entries get lost
- 'error' was an old entry but now we have multiple entries under 'error' (which is now a section), so we need to ensure that we migrate the old 'error' entry before the migration sets anything under that path
2018-02-02 19:40:28 +01:00
ljacqu
f44353ed4c #1467 Fix messages verification tool task + remove empty messages in YML files 2018-02-01 23:09:08 +01:00
ljacqu
f67ddb0c77 #1467 Migrate all message files, make sure migrater keeps predefined order 2018-02-01 20:23:06 +01:00
ljacqu
abd19cdb86 #1467 Fix error in placeholder migration, create and fix tests 2018-01-29 22:15:39 +01:00
ljacqu
760a2a909c #1467 Fix export issues (style, encoding)
- Override yaml file resource to ensure that lines aren't wrapped
- Override yaml file reader to ensure the file is always read as UTF-8
2018-01-29 21:46:58 +01:00
ljacqu
f714e9d564 #1467 Change message keys and messages_en to new structure 2018-01-29 20:56:30 +01:00
ljacqu
dfe47066cd Merge branch 'master' of https://github.com/AuthMe/AuthMeReloaded into 1467-message-keys-hierarchy 2018-01-29 20:04:38 +01:00
sgdc3
a92084ec60 Fix the deploy system 2018-01-29 15:08:59 +01:00
games647
be55437287
Use the correct javadoc deprecated tag for the lastlogin method 2018-01-27 22:56:42 +01:00
DNx
f7e9ac9685 Add support for delaying commands. 2018-01-26 14:28:02 +07:00
ljacqu
1eaf321575 #1467 Try to clean up abstract message file handler hierarchy
- Move some handling with the default file configuration down to the help message file handler since it is the only one with such a behavior now
2018-01-25 21:48:48 +01:00
ljacqu
820e443b81 #1467 Implement messages file migration
- Create messages updater called when a messages YML file is loaded
  - Work in progress
- Does not yet include changes to any message keys
2018-01-24 22:19:25 +01:00
ljacqu
b3a191d7e2 Minor: simplify CheckMessageKeyUsages task and make check more strict 2018-01-22 19:56:51 +01:00
Maxetto
0b096ea56e
[Messages_IT] Add specific message for register captcha success 2018-01-21 23:42:37 +01:00
ljacqu
6f2c586441 Test initialization of permission handlers in PermissionManager 2018-01-21 22:11:47 +01:00
ljacqu
610a699c95 Refactor message handlers into injectable components (preparation for #1467) 2018-01-21 20:47:29 +01:00
ljacqu
847991b658 #1474 Don't log /email changepassword command (exposes password) 2018-01-21 19:06:51 +01:00
ljacqu
761ee2f05b #1035 Migrate other accounts config from config.yml to commands.yml 2018-01-21 18:58:20 +01:00
Playhi
ad7a0ffe9b
Update messages_zhcn.yml
theCaptcha
2018-01-20 19:43:51 +08:00
Playhi
35e9858c30
Update messages_zhcn.yml 2018-01-19 21:27:00 +08:00
ljacqu
1e16f251ef
Merge pull request #1477 from AuthMe/1035-handle-alt-accounts-in-commandsYml
1035 handle alt accounts in commands yml
2018-01-17 21:49:29 +01:00
ljacqu
fe4ea6d22b Remove migration of commands from config.yml to commands.yml
- Migration was shipped with the 5.2 release and is now becoming harder to maintain; since it's quite old we drop it
2018-01-17 21:42:17 +01:00
Gabriele C
cdd14bee18
Merge pull request #1475 from RikoDEV/patch-3
Update messages_pl.yml
2018-01-17 20:30:03 +01:00
Jacek Maciejak
fb989a8955
Update messages_pl.yml 2018-01-17 18:40:27 +01:00
Jacek Maciejak
cc701772f4
Update messages_pl.yml 2018-01-17 18:36:06 +01:00
Jacek Maciejak
045bb1b669
Update messages_pl.yml 2018-01-17 18:33:46 +01:00
ljacqu
7f77f30439 Minor: Fix forgotten param documentation in JavaDoc 2018-01-16 20:40:21 +01:00
ljacqu
f19f8502d8 #1035 Forced commands: add more tests, rename account constraints, update commands.yml comments 2018-01-16 20:32:17 +01:00
ljacqu
3c0236e15e #1035 Fix handling of new login command constraints
- Incorporate ConfigMe fix
- Various fixes in the integration
2018-01-15 22:39:29 +01:00
RatchetCinemaESP
8a44dad548
Fix error in placerholder
<theCaptcha>
2018-01-15 17:45:43 +01:00
RatchetCinemaESP
0bbe109b55
Update messages_es.yml
1. Fix one error in current translation (Line 88)
2. Translated two strings of Captcha. (Line 101 & 102)
2018-01-15 17:13:09 +01:00
Jacek Maciejak
95bbbd9ba0
Update messages_pl.yml 2018-01-15 15:40:49 +01:00
ljacqu
8dbba1dc93 #1035 Add optional constraints to onLogin and onFirstLogin commands for number of alt accounts
- Extend Command to add specific constraints
- Currently doesn't work because of missing ConfigMe support
2018-01-14 12:23:04 +01:00
ljacqu
1cd5a6acce #1472 Add zhtw translation changes by @haer0248 2018-01-14 11:16:23 +01:00
ljacqu
d9c1af4311 #1454 Run other accounts command in sync mode 2018-01-08 23:08:37 +01:00
Twonox
e906a6abfa Update messages_fr.yml (#1469) 2018-01-08 21:20:41 +01:00
ljacqu
a29738e2a8 #1460 Fix null handling in recent players command
- Last login might be null
2018-01-06 20:26:07 +01:00
ljacqu
ea87075cd2 #930 Add specific message for register captcha success 2018-01-06 20:01:45 +01:00
ljacqu
9afd8679e9 Merge branch 'master' of https://github.com/AuthMe/AuthMeReloaded into 930-captcha-for-register 2018-01-06 19:04:14 +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
94cf310d5b Minor: fix code climate config test 2018-01-06 18:06:30 +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
0494886518 Merge branch 'master' of https://github.com/AuthMe/AuthMeReloaded into 930-captcha-for-register 2018-01-05 00:17:39 +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
KKHaneul
aea581c367
Update messages_ko.yml 2018-01-04 17:46:25 +09:00
KKHaneul
9918d532a4 Korean Translation #1 2018-01-03 18:17:34 +09:00
Gabriele C
30b9e034bc
Merge pull request #1462 from Maxetto/patch-1
[Messages_IT] Translate new messages
2017-12-27 20:05:32 +01:00
Maxetto
0a7e57b6a7 Improve security of Console and Log files (#1461)
* Finally kill removePassword option

* Cleanup

* Cleanup

* Cleanup

* Cleanup

* Final Cleanup

* Fix compile warning

* Revert "Cleanup"
2017-12-27 13:05:06 +01:00
Maxetto
b2b7eaa8e5
[Messages_IT] Translate new messages 2017-12-27 11:28:12 +01:00
ljacqu
c8d82a23e0 Merge branch 'master' of https://github.com/AuthMe/AuthMeReloaded into 930-captcha-for-register 2017-12-22 21:54:58 +01:00
ljacqu
8bae71e1bd #1435 Send password recovery emails in async 2017-12-21 21:54:23 +01:00
Gabriele C
779c4a2b33 Fix build 2017-12-19 10:53:07 +01:00
Gabriele C
0b91b8ba77
Merge pull request #1455 from rebirth00723/patch-1
Update messages_zhtw.yml
2017-12-17 17:45:10 +01:00
Adam Harrison
6f52449d49
Deprecate getLastLogin, replace with java 8 getLastLoginTime
(Resolves #1421)
2017-12-17 11:42:25 +01:00
rebirth00723
79d897e7ce
Update messages_zhtw.yml
Added some translations
2017-12-17 14:33:05 +08:00
Gabriele C
26a69297ce Disable the automatic poolSize option
it creates more issues than benefits
2017-12-13 23:13:28 +01:00
Thibaut DAVID
2d77f54695 Add new hash method (#1446)
Add new hash method for a CMS : http://craftmywebsite.fr/
2017-12-07 19:58:19 +01:00
Gabriele C
8f4171c436
Merge pull request #1438 from Twonox/patch-2
Update messages_fr.yml
2017-12-05 11:59:53 +01:00
Gabriele C
8fd402add3 #1442 Don't send bungee messages if the plugin is disabled
+ fix unit test on windows env
2017-12-05 00:30:08 +01:00
Twonox
0ac2524037
Update messages_fr.yml 2017-12-03 18:27:18 +01:00
Twonox
5e360ab8a4
Update messages_fr.yml 2017-12-03 12:11:58 +01:00
Twonox
952d58c87f
Update messages_fr.yml 2017-12-02 00:48:23 +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
058ac22462 Update docs 2017-12-01 19:16:49 +01:00
Timofey
ad6e13c396 messages_ru: verification code (#1432)
* ru: update
2017-12-01 19:02:40 +01:00
Gabriele C
a4550f786f
Merge pull request #1433 from montlikadani/patch-3
Updated messages_hu.yml file to the latest version
2017-12-01 17:08:53 +01:00
Gabriele C
755163c328
Merge pull request #1427 from Twonox/patch-1
Update messages_fr.yml
2017-12-01 17:08:19 +01:00
Twonox
a0982e2e92
Update messages_fr.yml 2017-12-01 16:57:19 +01:00
montlikadani
c5015381e2
Updated messages_hu.yml file to the latest version
TODO-s have been deleted and translated.
2017-12-01 16:17:08 +01:00
ljacqu
c784fc7f2e #1423 Fix ignored review remarks 2017-11-29 19:43:35 +01:00
Gabriele C
81db4168e4
Merge pull request #1428 from AuthMe/1423-cmi-support
#1423 Implement CMI spawn integration
2017-11-29 08:44:09 +01:00
Gabriele C
610fed3c7b Fix codestyle, add test 2017-11-29 08:38:34 +01:00
Gabriele C
7235a3b860
Merge pull request #1430 from AuthMe/1046-onFirstLogin-in-commandsYml
#1046 Add onFirstLogin to commands.yml
2017-11-29 01:11:25 +01:00
ljacqu
f1c1848985 #1046 Add onFirstLogin to commands.yml
- Allow to configure commands run on player's first login (login of player with a previously null lastlogin date)
2017-11-28 21:41:30 +01:00
ljacqu
50dbbb8d87 #1254 Create command to see recently logged in players
- Create datasource method to fetch most recent players by last login date
- Add command to view last logged in players
2017-11-28 21:07:10 +01:00
Gabriele C
c7c8e673f0 #1423 Implement CMI spawn integration 2017-11-28 12:57:39 +01:00
Twonox
1f898b05b6
Update messages_fr.yml 2017-11-27 18:04:13 +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
ljacqu
6365926cf0 Fix test in AntiBotServiceTest 2017-11-23 20:06:21 +01:00
ljacqu
53f7bf155f Fix wrong check in CodeClimateConfigTest 2017-11-23 18:13:17 +01:00
ljacqu
1053440b15 Refactor util for setting BukkitService mock behavior
- Move helper methods for setting BukkitService mock behavior into their own class
- Change methods to use Mockito's answer instead of verification + argument capture -> calling the methods now belongs to the test setup (given clause) and allows the behavior to take effect more than once
2017-11-22 00:24:11 +01:00
ljacqu
4717dc148c #1413 Don't run onUnregister command in async 2017-11-21 23:48:15 +01:00
Jacek Maciejak
f6423f5072 Update of Polish translation file. (#1420)
* Update of Polish translation file.

Translated: # Verification code
Updated: email > e-mail

* Update messages_pl.yml
2017-11-21 20:59:36 +01:00
sgdc3
3ca97f5d30 #1418 Cleanup 2017-11-20 13:15:20 +01:00
Dimatert9
0e0d8dff3d Do not use Bukkit#sendPluginMessage 2017-11-20 13:56:05 +02:00
Gabriele C
ce490304ea Merge branch 'master' of https://github.com/AuthMe/AuthMeReloaded 2017-11-15 18:08:01 +01:00
Gabriele C
2f019dbb0e Fix connectPlayerOnLogin
#1412
2017-11-15 18:07:55 +01:00
Gabriele C
a2430299b8
Merge pull request #1409 from Playhi/patch-8
Update messages_zhcn.yml
2017-11-15 17:57:25 +01:00
Playhi
b70e994341
Update messages_zhcn.yml
Add '
2017-11-15 23:03:19 +08:00
RatchetCinemaESP
3e31bcc2a1
Translate Email Verification messages.
Translated to Spanish
2017-11-12 17:07:48 +01:00
Playhi
19745f7052
Update messages_zhcn.yml 2017-11-12 20:58:12 +08:00
Gabriele C
b7c3d4b42e
Implement AuthMeBungee autologin (#1402)
* Implement AuthMeBungee autologin

There is a failing test due to cyclic dependency injection, @ljacqu could you take a quick look at this?

* Try to fix recursive dependency injection

* Fix codestyle

* Fix the subchannel name, again...

* Split BungeeService into BungeeSender and BungeeReceiver
2017-11-09 11:19:24 +01:00
Gabriele C
7e079d0b9c Whoops... fix the listening messaging subchannel name 2017-11-06 08:00:20 +01:00
ljacqu
c693901330 Merge branch '1400-phpbb-hash' of https://github.com/AuthMe/AuthMeReloaded 2017-11-04 11:32:44 +01:00