Commit Graph
100 Commits
Author SHA1 Message Date
ljacqu 28108f00f1 #569 Update messages_de.yml by Platinteufel 2016-02-27 22:55:51 +01:00
ljacqu 63b31b0814 Create resource closing test
- Generic test for MySQL and SQLite checking that all generated (Prepared)Statement and ResultSet instances are closed afterwards
- Fix offending code for test to pass
2016-02-27 22:45:39 +01:00
ljacqu 5fce849ce7 Minor - Add datasource test, minor code householding 2016-02-27 21:11:35 +01:00
ljacqu b916c9b2be Fix javadoc warnings + #421 add javadoc for new API 2016-02-27 16:31:58 +01:00
ljacqu e79f325411 #443 Use correct message to ask to add email after login 2016-02-27 12:18:04 +01:00
ljacqu 1b818bd833 #457 Improve ForceFlatToSqlite conversion
- Change ForceFlatToSqlite converter to use a generic datasource destination (i.e. can be used for Flat2MySQL later)
- Add tests, including for FlatFile
- Check that user is not present in destination datasource before adding
- Persist last location from flatfile as well
2016-02-27 11:24:47 +01:00
ljacqu 27b1fa770f #392 Add datasource integration tests 2016-02-26 22:12:16 +01:00
ljacqu 69092e9a9c #392 Add datasource integration tests 2016-02-24 21:50:40 +01:00
ljacqu 95e3943be0 Datasource integration tests - fix split by newline
- Make split of SQL file aware that new lines may be \r\n
- Remove split of new lines in MySQL as it's not necessary
2016-02-24 20:38:05 +01:00
ljacqu 5e16ca1490 #392 Create integration test for MySQL
- Relocate tests to AbstractDataSourceIntegrationTest to reuse tests for SQLite and MySQL
- Add H2 driver and create test class for MySQL
2016-02-22 21:52:10 +01:00
ljacqu 44e2218ada Merge pull request #111 from AuthMe-Team/542-lastlogin-to-bigint
#542 Revert lastlogin column from timestamp to bigint
2016-02-22 21:42:40 +01:00
ljacqu b6384da540 #542 Revert lastlogin column from timestamp to bigint
- While the timestamp type better represents what we store, we use timestamps internally in AuthMe and had to convert between the timestamp type to a long when communicating with a MySQL database. This ends up being inconsistent with SQLite, which does not support the storage of timestamps and an additional burden as the 0000-00-00 00:00:00 timestamp has a special meaning in MySQL we must otherwise check for before fetching values.
2016-02-22 21:04:01 +01:00
ljacqu fe057f367b Merge pull request #110 from AuthMe-Team/roinuj
Make "use other case" translatable (adjustment)
2016-02-22 20:37:43 +01:00
ljacqu 32159861d3 Update validation of message resources 2016-02-22 20:36:17 +01:00
ljacqu 72cf294056 Allow retrieval of messages with tag replacement 2016-02-22 20:32:44 +01:00
ljacqu e8f518711c #442 Fix email presence check being case-insensitive
- Add integration tests
- Change DataSource interface to return the number of accounts only, since that's all we require
2016-02-21 21:38:29 +01:00
ljacqu 203e954eea Minor test adjustments 2016-02-21 20:23:36 +01:00
ljacqu e8d627c0e1 #392 Start integration test for SQLite 2016-02-21 10:46:13 +01:00
ljacqu dfa3921740 Close resources in MySQL (incomplete)
- Connection, (Prepared)Statement and ResultSet all should be closed. try-with-resources is the best way as it's less verbose than a finally block and it's better than putting close() calls inside the try{} as that will not be run if an exception happens beforehand
2016-02-20 23:09:48 +01:00
ljacqu 511f961d29 #534 Get default messages from the JAR's messages_en.yml
- Using new File(class.getResource(path)) apparently is the wrong approach for in-JAR files
2016-02-20 12:12:24 +01:00
ljacqu 8511a257ed #494 Fix conversion plaintext to SHA256
- Make sure database is set up before attempting to perform the migration
2016-02-20 11:16:25 +01:00
ljacqu fd89915071 #517 Display welcome message for all logins 2016-02-20 08:23:02 +01:00
ljacqu 614d544edf #534 Send error if name is restricted (this time for real) 2016-02-20 07:26:58 +01:00
ljacqu 374113ff01 #534 Send error if name is restricted 2016-02-20 07:25:14 +01:00
ljacqu 90e0dc1875 Various code householding
- Remove unused API on DataSource
- Add some sensible javadoc to DataSource
- Minor code simplification
2016-02-19 23:19:38 +01:00
ljacqu 6f694cf818 #527 Persist email after changing it 2016-02-19 21:48:51 +01:00
ljacqu 964abdc0c5 Update add email tests (#527) 2016-02-19 19:26:16 +01:00
ljacqu 5795b9d8fd #533 Add integration sample for BCrypt 2016-02-19 19:14:12 +01:00
ljacqu ecc3048f52 Merge master into 'move-convert-command' 2016-02-14 22:32:12 +01:00
ljacqu f5b5595f08 #525 Make "not owner" kick reason translatable 2016-02-14 21:46:47 +01:00
ljacqu 7f3246e416 #519 #515 #431 Tool task to update all docs; relocate to root/docs
- Move docs from src/tools to a root subfolder
- Add tag for displaying a "generated page" footer
- Create task to run all doc tasks
- Remove map builder in favor of Guava's
2016-02-14 21:43:01 +01:00
ljacqu 8c6db4a2c9 Improve logging in SendMailSSL
- for #522
2016-02-14 18:04:10 +01:00
ljacqu 2c9cb6d99a #521 #514 Update zhhk file and add TODO comments for missing messages
TODO comments added automatically by ToolTask verifyMessages
2016-02-14 17:49:58 +01:00
ljacqu dbd896b462 Improving logging in SQLite 2016-02-14 17:49:56 +01:00
ljacqu 2dbcd50eea Merge pull request #100 from AuthMe-Team/415-perms-rework_NEW
#415 Move some permission nodes out of authme.player.*
2016-02-14 16:36:43 +01:00
ljacqu d198eca1b6 #514 Messages tool adds missing messages as comments
- Add the English text as a TODO comment for all missing messages in the translations
- Add a TODO comment for missing tags
- Change the task and messages verifier to use YamlConfiguration
2016-02-14 16:31:35 +01:00
ljacqu b3734f4010 #415 Move some permission nodes out of authme.player.*
- Move certain permission nodes outside of the authme.player branch
- Update classes / permissions list
- Remove wildcard node from code completely (since not used)
2016-02-14 14:15:02 +01:00
ljacqu 5dc1598f6e Wrap column names into class
- Load column names for data sources centrally
- Remove no longer used settings in legacy Settings
2016-02-14 13:25:16 +01:00
ljacqu 6e2528278a #477 Make updateSession() timestamp-aware; fetch timestamp safely 2016-02-14 09:51:13 +01:00
ljacqu 7b26dd25a0 Merge master into 477-lastlogin-timestamp
Conflicts:
    - Settings.java
2016-02-13 20:03:22 +01:00
ljacqu 432ed4620c Fix AuthMe thinking config needs a migration
- Old, deprecated property now exists again -> stop checking for its presence as a reason for migration
- Create test for SettingsMigrationService to detect such issues in the future
2016-02-13 12:35:33 +01:00
ljacqu 84741e2882 Minor - replace tabs to spaces in php integration sample 2016-02-13 11:00:56 +01:00
ljacqu cae9fc70fe #518 Create injection-safe website integration and demo form 2016-02-13 10:56:15 +01:00
ljacqu fcfe26f34d Minor - fix incorrect javadoc and add unit test for Messages#reload 2016-02-12 23:38:00 +01:00
ljacqu 57da572b23 #421 Clean up events javadoc and interface
- Add proper javadoc to all events
- Use proper handling of the Eventlist in all events: each event has its own EventList and its static method, as specified by Bukkit's Event class
- Add common supertype to all AuthMe events
- Remove unused events
- Remove unused methods (setters to fields that we ignore entirely)
2016-02-12 23:31:55 +01:00
ljacqu ea93a336c3 Minor - fix Javadoc warnings 2016-02-11 23:09:23 +01:00
ljacqu cf52fdac1c #482 Remove English messages in translation files
- Messages now default to the one in messages_en.yml if not present in the translation file
2016-02-11 22:48:34 +01:00
ljacqu 9b1d524bdc Make SettingsMigrationService run all migrations 2016-02-11 22:21:06 +01:00
ljacqu e04ca3c4ae #512 Fix inconsistent config names
- Harmonize configuration paths in code and in config.yml (fixes failing unit test)
- Add way to load Property objects in legacy Settings
- Create migration for delayJoinLeaveMessages to separate delayJoin..., removeJoin... and removeLeave...
2016-02-11 22:17:43 +01:00
ljacqu 39168bc818 #482 Provide better default messages and merge MessagesManager
- Return message from the JAR's messages_en.yml file instead of an unusable error for the end user
- Merge MessagesManager into Messages
2016-02-11 21:27:16 +01:00
ljacqu 806fd4731e Update readme to refer to AuthMe-Team/AuthMeReloaded
- Updated various "build badges" to display data for the AuthMe repository of AuthMe-Team
- Move Gource video a little down
- Mention support of IPB4 in readme and config
2016-02-10 21:52:11 +01:00
ljacqu b8e2f5fe1d Use RandomString for IPB4 implementation; minor documentation
- Improve RandomString and create new generateLowerUpper method
- Add documentation to the IPB4 class to explain why the salt is stored twice
2016-02-10 21:16:12 +01:00
ljacqu a16f6ae2d0 Add IPB4 to hash algorithm enum 2016-02-10 18:28:04 +01:00
ljacqu cb50f7b8c4 Minor - move IPB4 to correct package 2016-02-10 18:23:30 +01:00
ljacqu db4d4a7cce #477 Change lastlogin column from bigint to timestamp (work in progress)
- Alter column type
- Create migration for MySQL
- Unrelated: move DataSource enum to its own file
2016-02-07 14:27:03 +01:00
ljacqu 8d9a287315 Merge pull request #93 from AuthMe-Team/437-add-email
437 add email
2016-02-06 21:59:43 +01:00
ljacqu 2cd2b48a1a #437 Email uniqueness in admin command; finalization
- Check also in admin command that email is not already used
- Misc bug fixing (logic errors, changes lost during large merge)
- Use "email" and "setemail" as main labels for /authme subcommands
2016-02-06 21:56:08 +01:00
ljacqu b4b679d3b9 Merge branch 'master' of https://github.com/AuthMe-Team/AuthMeReloaded into 437-add-email
Conflicts:
	src/main/java/fr/xephi/authme/datasource/MySQL.java
	src/main/java/fr/xephi/authme/datasource/SQLite.java
	src/main/java/fr/xephi/authme/process/Management.java
	src/main/java/fr/xephi/authme/process/email/AsyncChangeEmail.java
2016-02-06 18:01:23 +01:00
ljacqu ad9625bb4e Merge pull request #92 from AuthMe-Team/450-new-settings-rewrite
450 new settings rewrite
2016-02-06 17:27:40 +01:00
ljacqu 92f81c32c9 Merge branch 'master' of https://github.com/AuthMe-Team/AuthMeReloaded into 450-new-settings-rewrite 2016-02-06 17:17:45 +01:00
ljacqu 99b7b80f1d #450 Fix copying of JAR files to plugin folder
- Create SettingsMigrationService#copyFileFromResource (inspired from CustomSettings)
- Use new method to copy missing files in plugin folder from JAR
- Create YamlFileConfiguration inside NewSetting: FileConfiguration object provided by JavaPlugin#getConfig() sets default values from the JAR's config.yml :(
- Change ConsoleLogger to take logger from plugin (work in progress)
2016-02-06 17:10:00 +01:00
ljacqu 85868ca830 Merge branch 'master' of https://github.com/AuthMe-Team/AuthMeReloaded into 450-new-settings-rewrite
Conflicts:
	src/main/java/fr/xephi/authme/AuthMe.java
	src/main/java/fr/xephi/authme/settings/Settings.java
	src/main/java/fr/xephi/authme/settings/custom/NewSetting.java
2016-02-05 23:28:16 +01:00
ljacqu a103aee4da Addendum - only write to log if specified by settings
- Commit forgotten removal of `!` during refactoring
2016-02-05 23:13:09 +01:00
ljacqu c28a1b537f #495 Create ConsoleLogger method dedicated to logging exceptions 2016-02-05 23:11:38 +01:00
ljacqu ab719c4204 Minor - remove messages language from old settings 2016-02-05 22:30:57 +01:00
ljacqu 3e30a34714 #450 Move Settings#loadEmailText and #getWelcomeMessage 2016-02-03 22:36:01 +01:00
ljacqu d3c1f06efb Update Hungarian messages
- Thanks to falconhome, via issue #470
2016-01-31 21:52:03 +01:00
ljacqu 155881ef05 Merge master into '450-new-settings-rewrite'
Conflicts:
  - PerformBackup.java
  - Settings.java
2016-01-31 21:32:29 +01:00
ljacqu 42ae30ed3a #450 Move Settings#isEmailCorrect to Utils class 2016-01-31 21:22:19 +01:00
ljacqu 9653354135 #450 Move Settings#getRestrictedIp() 2016-01-31 18:50:57 +01:00
ljacqu fbd5265a0b #450 Fix YAML export of enum values
- Move writing logic to PropertyType
- Remove unused double property type
- Add sample enum property type to tests
2016-01-31 10:49:30 +01:00
ljacqu e747dfeb7f #450 Make reload & messages functionality use NewSetting
- Change ReloadCommand to use the new setting functionality
- Check and construct the messages file in NewSetting
- Unrelated: change MessagesManager not to extend CustomConfiguration anymore
2016-01-31 09:55:02 +01:00
ljacqu a40b06344a Minor - remove override of equals() in PropertyMapComparator
- The Comparator map defines equals(Object) but this is obviously already implemented by the Object superclass
2016-01-30 15:32:48 +01:00
ljacqu 059175f14e #450 Port usages of Settings#set(), #setValue() to NewSettings 2016-01-30 15:12:26 +01:00
ljacqu 724296e02b #449 Migrate some properties to new settings
- Use new settings class for retrieving help header & backup configs
- Delete migrated configs from old settings
2016-01-30 13:19:05 +01:00
ljacqu dedb3fce26 #450 Add integration test for potentially difficult values
- Ensure that edge cases such as backslashes, apostrophes and new lines are handled properly by the YAML writer & reader
2016-01-28 10:38:44 +01:00
ljacqu c626521dc8 #473 Add logConsole setting
- Add missing logConsole setting
- Set true as default value, as suggested by games647
2016-01-27 21:34:10 +01:00
ljacqu ec87c662e1 #450 Use SnakeYAML for writing properties 2016-01-26 13:41:00 +01:00
ljacqu 737d7f1ca0 Merge pull request #87 from AuthMe-Team/347-config-rewrite
347 config rewrite
2016-01-17 13:01:28 +01:00
ljacqu 391e1b04a2 Fix #440 Hash algo's sometimes skipped for old algorithm support
- Fix check that discards potentially trying all encryption methods if password didn't match
- Wrap call to encryption method properly to avoid calling methods with hasSeparateSalt() = true and a null salt
2016-01-14 21:55:09 +01:00
ljacqu 8ed8b32589 #437 Add email should not allow to change email
- Create separate test for adding email
- Check that no email is yet registered for add email
2016-01-13 22:08:40 +01:00
ljacqu 36a57c5f02 Fix format of messages_zhcn.yml
- Possibly broken in b8abe71?
2016-01-10 00:02:26 +01:00
ljacqu ac164c73b9 #347 Add missing properties (incomplete) 2016-01-09 23:42:56 +01:00
ljacqu 4321d0b938 Merge branch 'master' of https://github.com/AuthMe-Team/AuthMeReloaded into 347-config-rewrite 2016-01-09 23:07:20 +01:00
ljacqu 4d2f39f06e #306 Add tests for CommandHandler and CommandMapper 2016-01-09 22:51:22 +01:00
ljacqu fc0b7c46ac #306 Add permission manager to command service
- Inject permission manager into command service explicitly via constructor
- Change command mapper to only care about generating FoundCommandResult objects, and command handler to worry about dealing with it later on
2016-01-09 21:57:20 +01:00
ljacqu 3845c1e0eb #347 Add NewSetting to command service
- Adjust NewSetting constructor to match needs in AuthMe
- Add NewSetting to the command service
- See CaptchaCommand for a sample replacement from Settings to NewSetting
2016-01-09 12:45:58 +01:00
ljacqu 88629702f5 #347 Test that all read properties exist as Property field
- Create consistency test to verify that all properties in config.yml are defined as a Property field in a SettingsClass implementation (currently fails)
- Add some missing properties
- Minor: convert tabs to spaces
2016-01-09 09:30:49 +01:00
ljacqu 0603243c86 Merge branch 'master' of https://github.com/AuthMe-Team/AuthMeReloaded into 347-config-rewrite 2016-01-08 23:44:16 +01:00
ljacqu 752ebe5022 Fix cast exception in integration test
- Although the class only has fields of Property type it would appear that CircleCI et al. may use libraries that add fields to classes later on, so we need to check for the field type
2016-01-08 23:40:54 +01:00
ljacqu d0b7d0ff06 #347 Create consistency and integration tests for NewSetting
- Ensure that the project's config.yml contains all settings that NewSetting is aware of
- Add extensive, more generic integration tests
2016-01-08 23:20:42 +01:00
ljacqu 69c225c850 #347 Create tests and add check for missing settings in NewSetting 2016-01-08 21:22:26 +01:00
ljacqu 30db03837a #347 Add 'contains' method to PropertyType 2016-01-07 21:58:28 +01:00
ljacqu 7d749801f9 Merge branch 'master' of https://github.com/AuthMe-Team/AuthMeReloaded into 347-config-rewrite 2016-01-07 21:51:20 +01:00
ljacqu acda03bb40 #347 Create enum property + consistency tests 2016-01-07 21:38:03 +01:00
ljacqu 120e69ac67 Fix null pointer in tests 2016-01-07 20:49:41 +01:00
ljacqu 204a564a9a Move new configuration packages and add test for PropertyMap 2016-01-05 21:59:08 +01:00
ljacqu 5ec1b67e03 Fix #408 Player quit location is not updated
- Ensure that the cache data source updates the quit location on the actual source
2016-01-04 21:52:39 +01:00
ljacqu cb07b3df3d Create enum property type, trivial code simplification 2016-01-04 20:33:31 +01:00
ljacqu 7d41ccbc9c Settings: use class constants for properties, create custom writer
- Create Property class for defining config properties
  - Create logic for typed retrival of properties from YAML file
- Add custom save method
  - Retain comments from Comment annotations in the classes
  - Write in a sorted order: first discovered properties are first written to config.yml
- Adjust properties to reflect the current config.yml
- Add sample tests for the retrieval and writing of properties with the new setup
2016-01-03 15:22:32 +01:00