Inactive [ADMN/SEC] AuthDB v2.3.6 - Database authentication and protection [1.1-1.4.5]

Discussion in 'Inactive/Unsupported Plugins' started by CraftFire, Mar 13, 2011.

  1. Offline

    CraftFire

    In order to centralize support of our legacy projects, we will no longer be providing support on Bukkit. Please use www.spout.org for support with our projects going forward.
     
  2. Offline

    djrazr

    ....2.3.6.242 and still errors with usernames with underscores... just repeating...
     
  3. Offline

    JohnPulse

    Hello!

    I'm getting some NPEs on new players join (to my knowledge), can you please take a look?
    On second join all is right. The problem is that on first join they bypass everything (permissions, chat block, etc.)
    CB 2034
    AuthDB 2.3.7.243


    Code:
    2012-03-21 00:12:46 [INFO] Can not test connection as heartbeatsql is not set
    2012-03-21 00:12:46 [INFO] Closing Connection[AuthDB.1] psReuse[102612] psCreate[22] psSize[19]
    2012-03-21 00:12:46 [SEVERE] Could not pass event PlayerLoginEvent to AuthDB
    org.bukkit.event.EventException
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:303)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:441)
        at net.minecraft.server.ServerConfigurationManager.attemptLogin(ServerConfigurationManager.java:226)
        at net.minecraft.server.NetLoginHandler.b(NetLoginHandler.java:95)
        at net.minecraft.server.NetLoginHandler.a(NetLoginHandler.java:87)
        at net.minecraft.server.Packet1Login.handle(SourceFile:68)
        at net.minecraft.server.NetworkManager.b(NetworkManager.java:229)
        at net.minecraft.server.NetLoginHandler.a(NetLoginHandler.java:47)
        at net.minecraft.server.NetworkListenThread.a(NetworkListenThread.java:61)
        at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:554)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:452)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:490)
    Caused by: javax.persistence.PersistenceException: ERROR executing DML bindLog[] error[[SQLITE_CONSTRAINT]  Abort due to constraint violation (PRIMARY KEY must be unique)]
        at com.avaje.ebeaninternal.server.persist.dml.DmlBeanPersister.execute(DmlBeanPersister.java:116)
        at com.avaje.ebeaninternal.server.persist.dml.DmlBeanPersister.insert(DmlBeanPersister.java:76)
        at com.avaje.ebeaninternal.server.persist.DefaultPersistExecute.executeInsertBean(DefaultPersistExecute.java:91)
        at com.avaje.ebeaninternal.server.core.PersistRequestBean.executeNow(PersistRequestBean.java:527)
        at com.avaje.ebeaninternal.server.core.PersistRequestBean.executeOrQueue(PersistRequestBean.java:557)
        at com.avaje.ebeaninternal.server.persist.DefaultPersister.insert(DefaultPersister.java:404)
        at com.avaje.ebeaninternal.server.persist.DefaultPersister.saveVanillaInsert(DefaultPersister.java:377)
        at com.avaje.ebeaninternal.server.persist.DefaultPersister.saveVanillaRecurse(DefaultPersister.java:361)
        at com.avaje.ebeaninternal.server.persist.DefaultPersister.saveRecurse(DefaultPersister.java:308)
        at com.avaje.ebeaninternal.server.persist.DefaultPersister.save(DefaultPersister.java:282)
        at com.avaje.ebeaninternal.server.core.DefaultServer.save(DefaultServer.java:1577)
        at com.avaje.ebeaninternal.server.core.DefaultServer.save(DefaultServer.java:1567)
        at com.authdb.util.databases.EBean.save(EBean.java:81)
        at com.authdb.util.databases.EBean.sync(EBean.java:102)
        at com.authdb.util.databases.EBean.sync(EBean.java:85)
        at com.authdb.listeners.AuthDBPlayerListener.onPlayerLogin(AuthDBPlayerListener.java:65)
        at sun.reflect.GeneratedMethodAccessor208.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:301)
        ... 12 more
    Caused by: java.sql.SQLException: [SQLITE_CONSTRAINT]  Abort due to constraint violation (PRIMARY KEY must be unique)
        at org.sqlite.DB.newSQLException(DB.java:383)
        at org.sqlite.DB.newSQLException(DB.java:387)
        at org.sqlite.DB.execute(DB.java:342)
        at org.sqlite.DB.executeUpdate(DB.java:363)
        at org.sqlite.PrepStmt.executeUpdate(PrepStmt.java:85)
        at com.avaje.ebeaninternal.server.lib.sql.ExtendedPreparedStatement.executeUpdate(ExtendedPreparedStatement.java:164)
        at com.avaje.ebeaninternal.server.type.DataBind.executeUpdate(DataBind.java:74)
        at com.avaje.ebeaninternal.server.persist.dml.InsertHandler.execute(InsertHandler.java:155)
        at com.avaje.ebeaninternal.server.persist.dml.DmlBeanPersister.execute(DmlBeanPersister.java:105)
        ... 31 more
    2012-03-21 00:12:46 [INFO] [RangeBans] PlayerX connected. Detected ip: xx.xx.xx.xx Detected hostname: xx.xx.xx.xx
    I'm using Joomla Script to local MySQL server. (Joomla version cooresponds to script)
    As followed:
    Code:
        name: Joomla
        version: 1.5.23
        tableprefix: jos_ 
    Regards,
    John
     
  4. Offline

    Wulfspider

    Not currently, sorry. :/

    Those errors shouldn't cause the issues you are describing as far as I know. Are you sure that's the correct error?

    I'm not sure that we fully support the reload command. You should be doing a proper stop and start anyways. I'll check with contex about it though.

    We'll look into it.

    I don't see how that error could be random. It sounds like your MC server lost connection to the MC server and was unable to reconnect. Likely that it was down for a period of time and unstable.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jul 15, 2016
  5. Offline

    JohnPulse

    Thanks for your feedback.
    At least they chat, with a Null prefix.
    I guess the Pex perm sistem don't even know what to do with the player when this NPE occurs.
    Any hint to where this is coming from?

    Regards,
    John
     
  6. Offline

    contex

    Wow, I acctualy managed to unwatch this topic...



    Would you mind sending your AuthDB.db to [email protected] so I can take a look at it?
     
  7. Offline

    JohnPulse

    Hi!

    Of course! Just sent you the file.

    Regards,
    John
     
  8. Offline

    contex

    Saw it, checking it now and going to test a bit, should have a solution within today/tommorow :)

    I just tested with your AuthDB.db and Joomla 1.5.25, and I was unable to recreate that issue.
    Could you try build 246: http://ci.craftfire.com/view/CraftF...Build/artifact/target/authdb-dev-SNAPSHOT.jar and see if there's any difference.
    If you still get the error, just reply and I'll take anotherlook at it.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jul 15, 2016
  9. Offline

    smartx32

  10. Offline

    Wulfspider

  11. Offline

    smartx32

  12. Offline

    contex

    Would you mind sending your AuthDB.db, which is located under plugins/AuthDB/, to [email protected] so I can take a look at it?

    Thank you.
     
  13. Offline

    droctogonapus

    What did I do wrong? The data base name is the same. It connected to the host fine.
    I use freemysql.net as the mysql host.

    [​IMG]

    [​IMG]
     
  14. @ contex/co-developers:

    How about an option/command to clean-up duplicate user accounts
    or set a limit of aliases a player can use on their ip address.

    One person managed to create 50 'alts' on my server :-/

    What i do now is delete the rows using HeidiSQL, but i'm not sure if that will break something, somehow, some time.

    Best regards and keep up the good work,
    - ThisUsernameIsMine ;-)
     
  15. Offline

    JohnPulse

    Hello again, sorry for bugging you with the same issue.

    Even with the latest Dev Build with the latest recommended CB 1.2.4, I'm getting the same error on a player first join.
    The symptom of bypassing permissions was a bad configuration on my end.
    For what I'm seeing, the player doesn't feel any problem, and can play normally. It's just that I get a bit worry with this NPE...

    Code:
    12:34:40 [INFO] Can not test connection as heartbeatsql is not set
    12:34:40 [INFO] Closing Connection[AuthDB.0] psReuse[250] psCreate[13] psSize[13
    ]
    12:34:40 [SEVERE] Could not pass event PlayerLoginEvent to AuthDB
    org.bukkit.event.EventException
            at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.ja
    va:303)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.jav
    a:62)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j
    ava:459)
            at net.minecraft.server.ServerConfigurationManager.attemptLogin(ServerCo
    nfigurationManager.java:226)
            at net.minecraft.server.NetLoginHandler.b(NetLoginHandler.java:102)
            at net.minecraft.server.NetLoginHandler.a(NetLoginHandler.java:94)
            at net.minecraft.server.Packet1Login.handle(SourceFile:68)
            at net.minecraft.server.NetworkManager.b(NetworkManager.java:229)
            at net.minecraft.server.NetLoginHandler.a(NetLoginHandler.java:48)
            at net.minecraft.server.NetworkListenThread.a(NetworkListenThread.java:6
    1)
            at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:554)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:452)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:490)
    Caused by: javax.persistence.PersistenceException: ERROR executing DML bindLog[]
    error[[SQLITE_CONSTRAINT]  Abort due to constraint violation (PRIMARY KEY must
    be unique)]
            at com.avaje.ebeaninternal.server.persist.dml.DmlBeanPersister.execute(D
    mlBeanPersister.java:116)
            at com.avaje.ebeaninternal.server.persist.dml.DmlBeanPersister.insert(Dm
    lBeanPersister.java:76)
            at com.avaje.ebeaninternal.server.persist.DefaultPersistExecute.executeI
    nsertBean(DefaultPersistExecute.java:91)
            at com.avaje.ebeaninternal.server.core.PersistRequestBean.executeNow(Per
    sistRequestBean.java:527)
            at com.avaje.ebeaninternal.server.core.PersistRequestBean.executeOrQueue
    (PersistRequestBean.java:557)
            at com.avaje.ebeaninternal.server.persist.DefaultPersister.insert(Defaul
    tPersister.java:404)
            at com.avaje.ebeaninternal.server.persist.DefaultPersister.saveVanillaIn
    sert(DefaultPersister.java:377)
            at com.avaje.ebeaninternal.server.persist.DefaultPersister.saveVanillaRe
    curse(DefaultPersister.java:361)
            at com.avaje.ebeaninternal.server.persist.DefaultPersister.saveRecurse(D
    efaultPersister.java:308)
            at com.avaje.ebeaninternal.server.persist.DefaultPersister.save(DefaultP
    ersister.java:282)
            at com.avaje.ebeaninternal.server.core.DefaultServer.save(DefaultServer.
    java:1577)
            at com.avaje.ebeaninternal.server.core.DefaultServer.save(DefaultServer.
    java:1567)
            at com.authdb.util.databases.EBean.save(EBean.java:81)
            at com.authdb.util.databases.EBean.sync(EBean.java:102)
            at com.authdb.util.databases.EBean.sync(EBean.java:85)
            at com.authdb.listeners.AuthDBPlayerListener.onPlayerLogin(AuthDBPlayerL
    istener.java:65)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
            at java.lang.reflect.Method.invoke(Unknown Source)
            at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.ja
    va:301)
            ... 12 more
    Caused by: java.sql.SQLException: [SQLITE_CONSTRAINT]  Abort due to constraint v
    iolation (PRIMARY KEY must be unique)
            at org.sqlite.DB.newSQLException(DB.java:383)
            at org.sqlite.DB.newSQLException(DB.java:387)
            at org.sqlite.DB.execute(DB.java:342)
            at org.sqlite.DB.executeUpdate(DB.java:363)
            at org.sqlite.PrepStmt.executeUpdate(PrepStmt.java:85)
            at com.avaje.ebeaninternal.server.lib.sql.ExtendedPreparedStatement.exec
    uteUpdate(ExtendedPreparedStatement.java:164)
            at com.avaje.ebeaninternal.server.type.DataBind.executeUpdate(DataBind.j
    ava:74)
            at com.avaje.ebeaninternal.server.persist.dml.InsertHandler.execute(Inse
    rtHandler.java:155)
            at com.avaje.ebeaninternal.server.persist.dml.DmlBeanPersister.execute(D
    mlBeanPersister.java:105)
            ... 32 more
    12:34:45 [INFO] [RangeBans] PlayerX connected. Detected ip: XX Detected hostname: XX
    
    I see the error [SQLITE_CONSTRAINT] Abort due to constraint violation (PRIMARY KEY must be unique)

    Do I gain something by checking the SQL tables with my basic DB knowledge? :)
    I can send you any information you like.

    Regards,
    John
     
  16. Offline

    contex

    I'm trying to resolve this issue as we speak, smartx32 just sent me a debug log which I'll look at in a second.
    Would you mind enabling debug and logging and see if you can get a log of what's happening.

    I've been trying to re-create this issue myself, without any luck.
     
  17. Offline

    JohnPulse

    I just enabled debug. Will post here as soon as I have something to show you.
    Thanks for your time.

    Regards,
    John.
     
  18. Offline

    contex

    Thank you!
     
  19. Offline

    JohnPulse

    Ok, I think I have what you need.

    Code:
    10:08:34 [INFO] This server is running CraftBukkit version git-Bukkit-1.2.4-R1.0
    -b2126jnks (MC: 1.2.4) (Implementing API version 1.2.4-R1.0)
    Code:
    10:09:02 [INFO] Plugins (37): Orebfuscator, GroupBasedPVP, WorldEdit, JoinMessag
    e, AutoShutdown, Vanilla, CommandBook, NoFloatingTrees, Vault, LogBlockQuestione
    r, PermissionsEx, Multiverse-Core, LogBlock, SignUtilities, WorldGuard, HelperBo
    t, Jail, dynmap, DynamicBan, EndReset, iConomy, ThumbsApply, AuthDB, ServerLogSa
    ver, Modifyworld, NoCheat, mcMMO, AutoAnnouncer, WorldBorder, ChatManager, Couri
    er, Multiverse-Portals, Multiverse-Inventories, VanishNoPacket, LWC, ChestShop,
    DeathTpPlus
    Debug Log:
    Here you see from server start, there are 2 players already registered that loged in and played on the server. Then in a diferent computer, I created from scratch a player the server never saw, PlayerTest2. On his first login the error showed.

    Log -> http://pastebin.com/d9YYKSLk
    Basic.yml -> http://pastebin.com/0nFJRbuy
    Advanced.yml -> http://pastebin.com/jWFb5fKh
    Joomla about -> http://pastebin.com/F9R7Zgmx

    Hope this helps.

    Regards,
    John
     
  20. Offline

    contex

    Thank you, that should help debugging, I'll reply back later this day to see if I've been able to fix this bug.
     
  21. Offline

    Wulfspider

    You don't have customdb enabled, but it looks like you are trying to use it. Simply set customdb: true in advanced.yml.
     
  22. Offline

    rustymetal

    So there seems to be a security issue with offline mode. Is it possible for AuthDB to fix this? As I had a player connect with an OPs name and shutdown the server. He clearly did not /login as im sure he does not have the password. Or is this plugin above the plugin API system?
     
  23. Offline

    Wulfspider

    Without a way of reproducing it and more details, I don't really see a way to fix it.
     
  24. Offline

    Adrenaline

    Case sensitive off.
     
  25. Offline

    TheRealIceGuru

    Is MyBB or Wordpress supported ?
     
  26. In addition to my previous suggestion

    Could any of the developers look into the 'kicked from server. flying not allowed' issue.
    Despite allowing flying in server.properties, 99% of the time people join the server they spawn slightly above a block, which causes the screen to shake/bounce (unless this is related to AuthDB's freeze-option) and causes AuthDB to spam 'You are not authorized to do that.'

    This also often results in being kicked for 'flying'.

    This problem has been with us for a long time and has been fixed in certain builds, but unfortunately it keeps haunting us and our servers :-/

    edit: on top of this i was forced to disable sessions, as people often typed their password while their session wasn't expired (it also happened to me once).

    The disadvantage/down-side of disabling sessions is that it results in more frequent 'You are not authorized to do that' spam and 'kicked from server. Flying not allowed'.

    (this happens under any CraftBukkit build and CB 1.5.6-R1.0 build an

    - ThisUsernameIsMine
     
  27. Offline

    Wulfspider

    Yes.

    It is related to the freeze option. You can change it so that they do not get frozen right away, and then they will drop to the ground first before being frozen. They'll be able to walk around a little bit though until that freeze kicks in. Just adjust the delay as needed on your server.

    Nothing we can do if users do not read that they are already logged in.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jul 15, 2016
  28. Thanks for your answer! I tried both 1 and 2 second delay, but screen bouncing/jumping still happens at times. Sometimes its difficult to move out of that position.
     
  29. Offline

    HammyHavoc

    Is this possible to integrate with Enjin? Are there any plans to make this compatible with the Enjin API?
     
  30. Offline

    Wulfspider

    I don't know. We'd have to take a look at it.
     
  31. Ok there's another issue that has been plaguing my server for a while.
    When running in offline-mode, sometimes logged in players lose their ability to see their own chat.

    I've been able to reproduce it and this is how it goes:

    Whenever someone tries to login under the name of a connected player, the connected player won't be able to see what they send. The text is broadcasted but the sender simply doesn't see it (they are still able to see other people's chat).
    They have to relog in order to see their text again.

    I've seen this happen with every offline-mode auth-plugin, but can't figure out what's causing it.
     

Share This Page