Generating Session IDs Question

Discussion forum for MOD Writers regarding MOD Development.
Locked
vortexhlp
Registered User
Posts: 195
Joined: Fri Jan 09, 2009 7:51 pm

Generating Session IDs Question

Post by vortexhlp »

So it seems that in /includes/sessions.php there's a little tidbit of code to generate the Session ID:

Code: Select all

$this->session_id = $this->data['session_id'] = md5(unique_id());
$sql_ary['session_id'] = (string) $this->session_id;
But where exactly is unique_id coming from? This vital piece of information is all that is needed to generate session IDs and it seems to be the salt to the hash. I see it being called from place to place but can't exactly find where it originates from. If someone could enlighten me I would much appreciate it! Thank you!

EDIT: I found it! Turns out there's a nice little site that I found which lets you type in any function for phpbb and it tells you in which file it's in. Turns out it's in the includes/functions.php file. CASE CLOSED :D
User avatar
AmigoJack
Registered User
Posts: 5819
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン
Contact:

Re: Generating Session IDs Question

Post by AmigoJack »

I would just have searched all files for function unique_id, but sadly my solution only works offline.
vortexhlp wrote:a nice little site that I found
Which site? This is the internet, it works thru links.
  • The worst thing about censorship is ███████████
  • "The problem is probably not my English but you do not want to understand correctly. ... We will not come anybody anyway, nevertheless, it's best to shit this." Affin, 2018-11-20
  • "But this shit is not here for you. You can follow with your. Maybe the question, instead, was for you, who know, so you shoved us how you are." axe70, 2020-10-10
Locked

Return to “[3.0.x] MOD Writers Discussion”