Commit 4f4e6438418833f03cc57fa24c86fac7789ed0b7

Authored by Georg Hopp
1 parent ae75d9d6

change session id creation from & time to ^ to get one without a username

Showing 1 changed file with 1 additions and 1 deletions
... ... @@ -22,7 +22,7 @@ sessionCtor(void * _this, va_list * params)
22 22 size_t nuname = va_arg(* params, size_t);
23 23
24 24 this->livetime = time(NULL) + SESSION_LIVETIME;
25   - this->id = sdbm((unsigned char *)uname, nuname) & this->livetime;
  25 + this->id = sdbm((unsigned char *)uname, nuname) ^ this->livetime;
26 26
27 27 this->username = malloc(nuname + 1);
28 28 this->username[nuname] = 0;
... ...
Please register or login to post a comment