Coder Social home page Coder Social logo

games647 / flexiblelogin Goto Github PK

View Code? Open in Web Editor NEW
87.0 12.0 23.0 803 KB

A Sponge minecraft server plugin for second factor authentication

Home Page: https://forums.spongepowered.org/t/8872

License: MIT License

Java 100.00%
cracked minecraft sponge 2fa authentication auth security plugin mod

flexiblelogin's Issues

jar file

Could you put the jar file with the last hotfix?

Lock account while logged in?

Some users are being douche bags and are logging into players who are already logged in which causes them to be kicked, can a command be added to /lockaccount which won't let anyone else login while they are authenticated?

Account Lockout

Just like any website / email:

If a user attempted more than the allowed amount of tries (config option) it will tempban the account for X amount of time (config option)

Improve the administrator command

Make a command like "/flexiblelogin" to be a Admin Command.

  1. Create account in server's console. (Like: /flexiblelogin register ............) (Some time administrators must prevent malicious registration, which needs to be registered in advance.)
  2. Delete account in server's console. (Like: /flexiblelogin ..........................)
  3. EMail, user's any other things, and any thing we can control.
  4. Any good thing...

I think this is great, because it is more convenient for the administrator.

Server crashing on failed user login

Running:
Flexible Login 12.3
Sponge API: 5.1.0 Snapshot 6459642
SpongeForge 1.10.2-2221-5.1.0 Beta 2142
MinecraftForge 12.18.3.2221

EDIT:
Removed config for space

Register command problem

/flexiblelogin resetpw|reload|unregister|register

Register : When use /flexiblelogin register Account Password, it show "Force register success", but account still not find in database...

AuthMe compatibility

Hello,

Can I ask you about AuthMe DB compatibility? I want to run new server on SpongeForge for 1.10.2, but I have to use AuthMe 'cause of web login connected with game. And on other servers I can't run Sponge.

y Movement isn't blocked

I found when I logined the game, the system had restricted me to move to left, right, forward or back successfully. However, when I tried to move up or move down, the system did not stop me. Yep, for most players, they cannot fly, but ops can do it. I hope you can improve this plugin(or mod?).
Thank you very much.

Add a strong language system

I have mentioned this issue, but I think this is very important, so put forward again, please forgive me.
Attract more users, rather than let them update their own language.

  1. Create a folder named "Messages" or "messages" (Oh ... case size is not a problem...... :P)...
  2. Create some lang files in "M(m)essages" folder like:
message_en
message_zhcn
message_ru
message_(country code)

We don't need a file suffix (like *.lang), because the meaning of "message" is very clear ( But, this is not a problem, too... What do you want to do, just like that).
3. In config file, users can change what language file they need to use(For example: Language "message_en").
4. Then accept the pulls from other users, it is perfect.
5. Done!!!

Nag Messages & Max Walk Distance

If you login on the server you will only get 1 message telling you to /login or /register. I think it should be replaced with if the user hasn't registered it will tell them they have to /register because saying /login might confuse them.

An unregistered user can also walk around and when they try to interact they don't get any messages reminded them to /register or they won't be able to do anything, because most think it's an issue with the server. And to go with that, add a maximum distance they can walk before being teleported back to their log out location usually something like 2-10 blocks.

Error feedback

[00:26:38] [Server thread/ERROR] [Sponge/sponge]: Could not pass FMLInitializationEvent to org.spongepowered.mod.plugin.SpongeModPluginContainer@64b0774
java.lang.NoClassDefFoundError: org/spongepowered/api/event/entity/DisplaceEntityEvent$TargetPlayer
at java.lang.Class.getDeclaredMethods0(Native Method) ~[?:1.8.0_101]
at java.lang.Class.privateGetDeclaredMethods(Unknown Source) ~[?:1.8.0_101]
at java.lang.Class.privateGetPublicMethods(Unknown Source) ~[?:1.8.0_101]
at java.lang.Class.getMethods(Unknown Source) ~[?:1.8.0_101]
at org.spongepowered.common.event.SpongeEventManager.registerListener(SpongeEventManager.java:181) ~[SpongeEventManager.class:1.10.2-2026-5.0.0-BETA-1599]
at org.spongepowered.common.event.SpongeEventManager.registerListeners(SpongeEventManager.java:225) ~[SpongeEventManager.class:1.10.2-2026-5.0.0-BETA-1599]
at com.github.games647.flexiblelogin.FlexibleLogin.onInit(FlexibleLogin.java:176) ~[FlexibleLogin.class:?]
at org.spongepowered.common.event.listener.GameInitializationEventListener_FlexibleLogin_onInit3.handle(Unknown Source) ~[?:?]
at org.spongepowered.common.event.RegisteredListener.handle(RegisteredListener.java:95) ~[RegisteredListener.class:1.10.2-2026-5.0.0-BETA-1599]
at org.spongepowered.mod.event.SpongeModEventManager.post(SpongeModEventManager.java:354) [SpongeModEventManager.class:1.10.2-2026-5.0.0-BETA-1599]
at org.spongepowered.mod.event.SpongeModEventManager.post(SpongeModEventManager.java:395) [SpongeModEventManager.class:1.10.2-2026-5.0.0-BETA-1599]
at org.spongepowered.mod.SpongeMod.onStateEvent(SpongeMod.java:205) [SpongeMod.class:1.10.2-2026-5.0.0-BETA-1599]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_101]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_101]
at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) [minecraft_server.1.10.2.jar:?]
at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) [minecraft_server.1.10.2.jar:?]
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) [minecraft_server.1.10.2.jar:?]
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) [minecraft_server.1.10.2.jar:?]
at com.google.common.eventbus.EventBus.post(EventBus.java:275) [minecraft_server.1.10.2.jar:?]
at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:239) [LoadController.class:?]
at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:217) [LoadController.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_101]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_101]
at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) [minecraft_server.1.10.2.jar:?]
at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) [minecraft_server.1.10.2.jar:?]
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) [minecraft_server.1.10.2.jar:?]
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) [minecraft_server.1.10.2.jar:?]
at com.google.common.eventbus.EventBus.post(EventBus.java:275) [minecraft_server.1.10.2.jar:?]
at net.minecraftforge.fml.common.LoadController.redirect$onPost$0(LoadController.java:53) [LoadController.class:?]
at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:142) [LoadController.class:?]
at net.minecraftforge.fml.common.Loader.initializeMods(Loader.java:788) [Loader.class:?]
at net.minecraftforge.fml.server.FMLServerHandler.finishServerLoading(FMLServerHandler.java:107) [FMLServerHandler.class:?]
at net.minecraftforge.fml.common.FMLCommonHandler.onServerStarted(FMLCommonHandler.java:333) [FMLCommonHandler.class:?]
at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServer.java:214) [ld.class:?]
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:431) [MinecraftServer.class:?]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_101]
Caused by: java.lang.ClassNotFoundException: org.spongepowered.api.event.entity.DisplaceEntityEvent$TargetPlayer
at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191) ~[launchwrapper-1.12.jar:?]
at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_101]
at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_101]
... 40 more
Caused by: java.lang.NullPointerException

Installation instructions

Hi,

Would you mind providing installation instructions?

I have placed the FlexibleLogin plugin in the mods directory of the Forgeserver in which also Sponge is placed, sponge gets registered during start, but the plugin does not and no configuration file is generated.

Kind regards

FlexibleLogin tries to set safe-location using the Sponge API

Hello, here #15 said
FastLogin tries to set safe-location using the Sponge API.
but they still don't solve this.
My question is, when not using FlexibleLogin, no problem happened, login will stand on last logout location, but using FlexibleLogin will change login location then may enters the door into the room.
Why not cancel searching safe-location function? I think iron-door is a safe-location, even that location where player logout is also a save location. Is it not?

Cannot register with SQLite database

Packages in use:
forge-1.8-11.14.4.1563-universal.jar
spongeforge-1.8-1577-3.0.0-BETA-1000.jar
FlexibleLogin.jar (0.3.2)

When attempting to register:

[19:19:26] [pool-2-thread-1/ERROR] [flexiblelogin]: Error registering account
java.sql.SQLException: [SQLITE_CONSTRAINT]  Abort due to constraint violation (NOT NULL constraint failed: users.UserID)
        at org.sqlite.core.DB.newSQLException(DB.java:890) ~[DB.class:1.8-1577-3.0.0-BETA-1000]
        at org.sqlite.core.DB.newSQLException(DB.java:901) ~[DB.class:1.8-1577-3.0.0-BETA-1000]
        at org.sqlite.core.DB.execute(DB.java:810) ~[DB.class:1.8-1577-3.0.0-BETA-1000]
        at org.sqlite.jdbc3.JDBC3PreparedStatement.execute(JDBC3PreparedStatement.java:50) ~[JDBC3PreparedStatement.class:1.8-1577-3.0.0-BETA-1000]
        at com.zaxxer.hikari.pool.ProxyPreparedStatement.execute(ProxyPreparedStatement.java:44) ~[ProxyPreparedStatement.class:1.8-1577-3.0.0-BETA-1000]
        at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.execute(HikariProxyPreparedStatement.java) ~[HikariProxyPreparedStatement.class:1.8-1577-3.0.0-BETA-1000]
        at com.github.games647.flexiblelogin.Database.createAccount(Database.java:272) ~[Database.class:?]
        at com.github.games647.flexiblelogin.tasks.RegisterTask.run(RegisterTask.java:33) ~[RegisterTask.class:?]
        at org.spongepowered.api.scheduler.Task$Builder.lambda$execute$9(Task.java:138) ~[Task$Builder.class:1.8-1577-3.0.0-BETA-1000]
        at org.spongepowered.common.scheduler.SchedulerBase.lambda$startTask$55(SchedulerBase.java:177) ~[SchedulerBase.class:1.8-1577-3.0.0-BETA-1000]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_66]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_66]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_66]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_66]
        at java.lang.Thread.run(Thread.java:745) [?:1.8.0_66]

Suggest: Put the language file out.

Hi ! Sir ! I had a suggest for you !
Don't put the language file in the conf, but on the outside.
This is not conducive to multi language.

Any way, this plugin is amazing !!!

About help documentation system

I think we need a more complete help documentation system, or, we need a frequently updated document system. I think we should make good use of Github's Wiki system.

Logout and then Login will be teleported into room

Hello, when I stand on front of a iron_door, and I logout and then login, I am teleported into the room! The situation is that Iron_door and me are on the same block, door is on the north size of the block, then I am teleported to the north size block of the door. But not using FlexibleLogin will be normal. my version is spongevanilla-1.8.9-4.2.0-BETA-343, spongevanilla-1.8.9-3.1.0-BETA-248, both of them the same bug!

Register/login notice does not come up on unregistered users' appearance

Using 0.4.1.

[20:27:54] [pool-2-thread-1/ERROR] [Sponge]: The Scheduler tried to run the task flexiblelogin-A-0 owned by Plugin{id=flexiblelogin, name=FlexibleLogin, version=0.4}, but an error occured.
java.lang.NullPointerException
        at com.github.games647.flexiblelogin.listener.PlayerConnectionListener.lambda$onPlayerJoin$0(PlayerConnectionListener.java:34) ~[PlayerConnectionListener.class:?]
        at org.spongepowered.api.scheduler.Task$Builder.lambda$execute$9(Task.java:138) ~[Task$Builder.class:1.8-1577-3.0.0-BETA-1000]
        at org.spongepowered.common.scheduler.SchedulerBase.lambda$startTask$55(SchedulerBase.java:177) ~[SchedulerBase.class:1.8-1577-3.0.0-BETA-1000]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_66]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_66]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_66]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_66]
        at java.lang.Thread.run(Thread.java:745) [?:1.8.0_66]

[Suggestion] Some details.

  1. When a player in a state that is already logged in, then he uses the /login command again, why is it still prompted "Logged in"? I think it should be prompt: Please do not repeat the login. :P
  2. If a player uses /logout, why there is no "Not logged in. Type /login ........." prompt?

Item dupe

Hello!
Not sure if is known bug, but one can dupe almost everything.
you can check this video: https://www.dropbox.com/s/jjzop7dx8wczhsr/2.avi?dl=0

  1. You should be logged in to the system;
  2. Put single item to quickbar cell;
  3. Drop this item (Q or ctrl+Q);
  4. Log out;
  5. Open inventory and click on cell where your item was before drop.

expected: nothing happens, cell should be empty
actual: item duplicate to your inventory

  1. login and pick up items dropped on step 2.

Version for API 4.x

Since it looks like API 5 won't be stable for some time, and players can run command, chat, move around which is a huge issue

Unregister command vs. server's cache

When you unregister some player (/unregister nickname), He is removed from database, but still remains in some running server cache and unregistered player can login, logout and login after disconnection from server again and again until server's restart.

FlexibleLogin Ignores Bypass Permission in LuckPerms

Hello,

I am using FlexibleLogin with LuckPerms on Sponge with the FTB Infinity modpack. When I give my users the flexiblelogin.bypass permission, although they are not spammed with the /register message, they still get kicked after the login timeout. I would like to only require staff members to /register and to disable it for regular users.

Screenshot of default group's permissions:
screenshot from 2017-03-21 11-55-44

Versions:
Luckperms: v3.0.41
Minecraft: 1.10.2
SpongeAPI: 5.2.0-SNAPSHOT-a3257a0
SpongeForge: 1.10.2-2254-5.2.0-BETA-2230
Minecraft Forge: 12.18.3.2254
FlexibleLogin: 0.12.3

(Game game, Logger logger) method in constructors of classes is no longer needed

In my latest pull request #6 I added a safe getInstance() method in the main plugin class, which allows you to easily get an instance of Game and Logger. Because of this, the Game and Logger parameters in the constructor of most classes are no longer required.

(You also removed the getInstance() method I created, I want it back)

A few feature requests

  • Ability for an admin to change a users password
  • Setting recovering information to prove account identity
  • Maximum registrations per ip-address
  • Locking a account for X amount of time after X amount of attempts
  • Ability to /logout to prevent ip-sessions from auto-logging in
  • Minimum password length
  • Ability for an admin to change a users password
  • Maximum registrations per ip-address
  • Locking a account for X amount of time after X amount of attempts
  • Ability to /logout to prevent ip-sessions from auto-logging in
  • Minimum password length

auto login

ipAutoLogin=true
Stopped working! For all. Requires login.

forge-1.11-13.19.1.2195-universal.jar
spongeforge-1.11-2195-6.0.0-BETA-2004.jar
FlexibleLogin.jar latest

Update to API 6?

I don't know what's the relationship between API 5 and 6......

Login fails

A message appears on successful login. You can play, run commands... But after a few seconds automatically exit and the message that the time for entry has expired.

timeoutLogin=50

Error feedback

FlexibleLogin v0.9.2
spongeforge-1.8.9-1890-4.2.0-BETA-1653
forge-1.8.9-11.15.1.1902-1.8.9-universal

[03:39:42] [Server thread/ERROR] [Sponge/]: Could not pass ClientConnectionEvent$Disconnect$Impl to org.spongepowered.mod.plugin.SpongeModPluginContainer@5e395b5f
java.lang.NullPointerException
    at java.util.concurrent.ConcurrentHashMap.replaceNode(Unknown Source) ~[?:1.8.0_101]
    at java.util.concurrent.ConcurrentHashMap.remove(Unknown Source) ~[?:1.8.0_101]
    at com.github.games647.flexiblelogin.listener.ConnectionListener.onPlayerQuit(ConnectionListener.java:53) ~[ConnectionListener.class:?]
    at org.spongepowered.common.event.listener.DisconnectListener_ConnectionListener_onPlayerQuit31.handle(Unknown Source) ~[?:?]
    at org.spongepowered.common.event.RegisteredListener.handle(RegisteredListener.java:95) ~[RegisteredListener.class:1.8.9-1890-4.2.0-BETA-1653]
    at org.spongepowered.mod.event.SpongeModEventManager.post(SpongeModEventManager.java:201) [SpongeModEventManager.class:1.8.9-1890-4.2.0-BETA-1653]
    at org.spongepowered.mod.event.SpongeModEventManager.post(SpongeModEventManager.java:184) [SpongeModEventManager.class:1.8.9-1890-4.2.0-BETA-1653]
    at org.spongepowered.mod.event.SpongeModEventManager.post(SpongeModEventManager.java:229) [SpongeModEventManager.class:1.8.9-1890-4.2.0-BETA-1653]
    at org.spongepowered.mod.event.SpongeModEventManager.post(SpongeModEventManager.java:214) [SpongeModEventManager.class:1.8.9-1890-4.2.0-BETA-1653]
    at org.spongepowered.common.SpongeImpl.postEvent(SpongeImpl.java:129) [SpongeImpl.class:1.8.9-1890-4.2.0-BETA-1653]
    at net.minecraft.network.NetHandlerPlayServer.redirect$onDisconnectHandler$0(NetHandlerPlayServer.java:439) [lm.class:?]
    at net.minecraft.network.NetHandlerPlayServer.func_147231_a(NetHandlerPlayServer.java:704) [lm.class:?]
    at net.minecraft.network.NetworkManager.func_179293_l(NetworkManager.java:449) [ek.class:?]
    at net.minecraft.network.NetworkSystem.func_151269_c(NetworkSystem.java:183) [ll.class:?]
    at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:724) [MinecraftServer.class:?]
    at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:344) [ko.class:?]
    at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:605) [MinecraftServer.class:?]
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:481) [MinecraftServer.class:?]
    at java.lang.Thread.run(Unknown Source) [?:1.8.0_101]

Reload command problem

The admin command problem:

When I use:
/flexiblelogin reload

Console show me this:
Not enough arguments!
Usage: /flexiblelogin <account> resetpw|reload|unregister|register

Need a account name?! What is the relationship between "reload" and "account"?
So I think the Reload command should be independent.

The suggestion for login teleporation

In offline mode, a player can use any name to join game. Although FlexibleLogin can stop people who are not the owner of the account to do bad thing, people still can use F3 to check the position of the account used. For some people, they may utilize this fuction to set a trap to kill others.
Could you add a function to protect innocent players from these spiteful actions?
I think if there is a function which teleporates all of the unlogin players to world spawn point forcely, and teleporate players back after they login into the game successfully, it will protect players better.

Can not support PermissionsEx?...

For example, when use this command:

/pex group defualt permission flexiblelogin.command.logout false

Users always can logout..........

chinese translate

i just translate your job to chinese,can you add it into future releases?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.