Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8772657
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T18:05:20+00:00 2026-06-13T18:05:20+00:00

I’m Using phpfox with userplane webchat and this function is to grab sessionGuid from

  • 0

I’m Using phpfox with userplane webchat and this function is to grab sessionGuid from the database Original function is:
Function 1:

function get_current_online_session_login() {
        $oSrvSec = &App::getModuleService('Account', 'Security');
        $login = $oSrvSec->getCurrentUserLogin();
        $aReq = getRow(App::getT('online_session'), 'online_session_user = "' . $login . '"');
//      return $aReq['online_session_login'];
        return $aReq['online_session_id'];
    }

And i make change’s in it so it return the salted hash but Chat is not working and show error that you are not authorized to enter in chat.
Here is what i make change in this code:

function get_current_online_session_login() {
        $oSrvSec = &App::getModuleService('Account', 'Security');
        $login = $oSrvSec->getCurrentUserLogin();
        $aReq = getRow(App::getT('online_session'), 'online_session_user = "' . $login . '"');
        $salt='waka_waka_shaka_laka_8342394';
//      return $aReq['online_session_login'];
        $umSar = $aReq['online_session_id'];
        $saltedHash = md5($umSar . $salt);
        return $saltedHash;
    }

in this file have 2 function for session_id so i am not sure how to resolve this issue
here is the 2nd session_id function:
Function 2

function get_user_with_session_id($session_id) {
        $session = getRow(App::getT('online_session'), "online_session_id = '$session_id'");
//      $session = getRow(App::getT('online_session'), "online_session_login = '$session_id'");
        $oSecurityService = &App::getModuleService('Account', 'Security');
        $user = $oSecurityService->getUserByName($session['online_session_user']);      
        return isset($user) ? $user->aData['id'] : null;
    }

Please i need help.
You can see function 1: and function 2: are original function in my common.php file and this function return the normal figure’s for session_id and i want to return session_id as md5 salted hash or base_64.
Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T18:05:21+00:00Added an answer on June 13, 2026 at 6:05 pm

    First you should understand, what a session-id is for. Normally the server will not recognize, that a user has already done some actions on a website, each request is like a new visit. To remember a user and his actions, the server stores them together with a random number, the session-id.

    This session-id will be passed to the browser, and if the user e.g. presses a button, this session-id is handled back to the server. Now the server can look for the stored actions with this number and therefore will “remember” the user.

    In your example you took the session-id, destroyed it with a one way hash function, and passed it to the browser. When the browser handles back this invalid session-id, the server has no chance to find the stored actions with this invalid number.

    That said, the session-id is only a number to refind the already stored information on the server. It does in no way improve security, when you alter this number, because the browser will just send back what he gets, and the server has to recognize it, whether he previously encrypted/obfuscated it or not.

    If your session-ids are predictable, like 203, 204, …, then you should find the piece of code which generates such inappropriate numbers and modify this code, so it produces “truly” random numbers.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
Let's say I'm outputting a post title and in our database, it's Hello Y’all
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
Does anyone know how can I replace this 2 symbol below from the string
I have a view passing on information from a database: def serve_article(request, id): served_article
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I am reading a book about Javascript and jQuery and using one of the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.