Anope IRC Services

Please login or register.

Login with username, password and session length
Advanced search  

News:

Pages: [1]   Go Down

Author Topic: Anope 1.8.0 & mySQL problem  (Read 4974 times)

0 Members and 1 Guest are viewing this topic.

stimpz0r

  • Anope User
  • Offline Offline
  • Posts: 3
Anope 1.8.0 & mySQL problem
« on: June 16, 2009, 01:13:51 PM »

hello everyone ;]

i have a problem regarding anope 1.8.0 and mysql. i am currently trying to modify phpanope and add extra features with misc_mysql to add features such as the ability to register nicknames and channels and such.

ive hit a problem where i cant get the site to register logins. upon further inspection it seems that the passwords stored in anope_ns_core are illegible. i tried changing the table structure for the password row to text from tinyblob, ive even tried disabling MysqlSecure and even encryption to the flatfile databases but to no avail. after days of trying all sorts of tricks with php to attempt to convert the data to something more legible im completely stuck.

the passwords i get resemble such (not even sure if they will look anything like they should on this forum):

þyÐ÷cf¯ù/üÇàc�������������������������������

is this the usual output for the pass field or is my database being corrupted in some way? does anyone have any idea how i can fix this?

thank you in advance. ;o
Logged
- stimpz0r [kriticalCREW]

Jobe

  • Contributor
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 1023
    • Anope IRC Services
Re: Anope 1.8.0 & mySQL problem
« Reply #1 on: June 16, 2009, 04:45:41 PM »

Your issue with the passwords is because you have chosen an EncModule other then enc_none.

enc_md5 and enc_sha1 (iirc) store the passwords in raw binary format, instead of the expected hex encoded format.

enc_old however needs custom code to hash passwords in the same way for matching.
Logged
Your IP: ()
My IRC Status:

Come along and visit http://www.anopequotes.org/

stimpz0r

  • Anope User
  • Offline Offline
  • Posts: 3
Re: Anope 1.8.0 & mySQL problem
« Reply #2 on: June 17, 2009, 03:37:24 AM »

Your issue with the passwords is because you have chosen an EncModule other then enc_none.

enc_md5 and enc_sha1 (iirc) store the passwords in raw binary format, instead of the expected hex encoded format.

enc_old however needs custom code to hash passwords in the same way for matching.

my EncModule is set to enc_none, so unfortunately that is not my problem. as stated in my first post, MysqlSecure is also not set.

is there any custom code id need to read the raw binary via php? if anyone would know of how i could convert these passwords to a readable format (whether it be standard plaintext passwords, or even md5/sha1 hashed) it would be greatly appreciated.
Logged
- stimpz0r [kriticalCREW]

stimpz0r

  • Anope User
  • Offline Offline
  • Posts: 3
Re: Anope 1.8.0 & mySQL problem
« Reply #3 on: June 17, 2009, 04:30:58 AM »

to all those concerned,

i found my solution! probably not the solution for everyone, but since i already had passwords encrypted in the flatfile database, the passwords were still saving to the mysql database mangled. i simply reset my databases (luckily i didnt have any users as i havent officially "opened" the server) and set MysqlSecure to the appropriate encryption, i also changed the pass field in anope_ns_core to text instead of tinyblob. now my passwords are coming out in plain text instead of binary, and the web interface is accepting the passwords.

thank you to all those that helped me on the way. your help is much appreciated. ;]
Logged
- stimpz0r [kriticalCREW]
Pages: [1]   Go Up