Jump to content
TrinityCore

How is the username stored through auth?


DoxramosPS
 Share

Recommended Posts

I know that the proper syntax while creating a user account in php is to run the username and password as upper and sha1 

sha1("USER:PASS")

But my question is more say you want to have a way to update the password? I tried with a standard query 

UPDATE accounts SET sha_pass_hash = sha1("USERNAME:NEWPASS") WHERE username = :arg

:arg is just a general username placeholder, but when I run that command. it still takes the old login information. I know you can use the console to set the password, but I'm looking at ways to run it when the server is offline, Does anyone know why this doesn't work?

Link to comment
Share on other sites

  • 1 month later...
 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By Madbryan
      Hi,
      I've follow the explanation to make a server with the mmaster branch.
      The authserver and worldserver launch without error.
      I've created an account with the command bnetaccount create
      But when i try to identificate on wow, it says that the login or password is invalid.
      How could vérify that password are encrypted in the right way and decrypt in the good way too ?
       
      Thanks in advance and for all your good work.
       
      Example of salt et verifier that appear in my database auth :
      Salt : ҕ��E��O���4��`˷����NV�:
      Verifier : � ���1ri͐������IDmm-�����v
       
      My table are in utf8_general_ci for auth, world and characters table and utf8mb4_unicode_ci for hotfixes
      MySQL57
      MySQL Workbench 8
      Visual Studio 2019
      Git v2.30.0

    • By shroom
      Hi,
      Following one recent commit officially adding MariaDB 10.4 support, I took this opportunity to update my database server (from MariaDB 10.1 to MariaDB 10.4) and compiled the game server with the corresponding libraries instead of MySQL 5.7.
      Everything went fine and the server runs properly.
      I had one tiny little issue though: I had to fill the MySQLExecutable variable in the conf file otherwise the worldserver executable wouldn't launch:
      Didn't find any executable MySQL binary at '/Server/Release/bin/Release' or in path, correct the path in the *.conf ("MySQLExecutable").
      I never had to fill this variable before and it was still working fine with this commit: https://github.com/TrinityCore/TrinityCore/commit/48c700347c91b1748427a8c5b09b8d4099c9a105
      I'm running with this commit at the moment: https://github.com/TrinityCore/TrinityCore/commit/43d9ffd1bc127768882711a47d5e2bae92845d04
      It's not that big of deal obviously, but the worldserver conf file states for this variable:
      If the path is left empty, built-in path from cmake is used.
      Alas, while being properly set in CMake, the path isn't used anymore.
      Is this the new expected behavior or is this a bug?
    • By Xzter
      Hello, before i was using trinity fine, everything working perfect. But now, im always getting the worldserver.exe crash.
      Here is log, if someone  can help me to fix it, please. Thanks

      Screenshoot where error always appear

      And, Error Log 
      b19413aaf21d_worldserver.exe_[22-4_11-51-42].txt
    • By gldssgames
      Hi, I am having problems with auto update (I find it very confusing to update each update manually), it seems that it only works in version deployed and not as autonomous.
      I run mysql via Command Prompt has worked for me for a long time in projects ... I think it may be ... because I point the configuration file.
      This sentence caught my attention: "failed! If you are a user" (phrase shown in the worldserver log) which I think may have to have permission
      The mysql configuration file, Server log file and the bat pitcher in the form of text is attached, if no one accidentally runs.
      The mysql configuration file and the bat mysql run in the form of text is attached, so no one accidentally runs.
      I will continue to seek a solution, if I find I put here for others with the same problem.
      Thank you for all!

      Since I do not speak English, I translated using google, I'm sorry for that.
      my.ini
      mysql.bat.txt
      Server.log
    • By darki73
      So i guess it is pretty obvious about what am i going to ask =)
      Problem is, previousle we could just sha1 username and password separated by colon and here is the sha_pass_hash.
      The problem i am facing right now, is that according to https://github.com/TrinityCore/TrinityCore/blob/86b98686a95e23247ecb774fb23ecd5b8d94b97b/src/server/game/Accounts/BattlenetAccountMgr.cpp#L177 Trinity now uses SHA256, so the hashes do not match anymore. The thing is, password length in database is 40 symbols (exactly as many as in sha1 hash), but sha256 hash length is 64 characters long. I am confused...
      I've tried to recreate whole "Cryptography" thing on PHP but, guess what, failed.
      Can somebody explain me how the password is generated nowadays?
      Thank you for your attention. 
×
×
  • Create New...