Results 1 to 3 of 3
-
12th Oct 2010, 05:34 PM #1OPMember
[PHP] Session's secure
Hello,
I am currently making something in PHP,and I have login and It works with Sessions,I saw attack called 'Session Hijacking' so I'll ask you if this vulnerable to 'Session Hijacking'.
So,I check if username & password is equal to username & password in database if yes it gives it $_SESSION['username'] = $username and $_SESSION['AdminId'] = 1.
PHP Code:<?php
$username = mysql_real_escape_string($_POST['username']);
....
if ($row > 0) {
$_SESSION['username'] = $username;
$_SESSION['AdminID'] = 1;
}
?>
PHP Code:<?php
if(!empty($_SESSION['username']) and $_SESSION['AdminID'] == 1) {
echo "Logged in!";
} else {
echo "Not logged in!";
}
?>Nedim! Reviewed by Nedim! on . [PHP] Session's secure Hello, I am currently making something in PHP,and I have login and It works with Sessions,I saw attack called 'Session Hijacking' so I'll ask you if this vulnerable to 'Session Hijacking'. So,I check if username & password is equal to username & password in database if yes it gives it $_SESSION = $username and $_SESSION = 1. <?php $username = mysql_real_escape_string($_POST); .... if ($row > 0) { $_SESSION = $username; $_SESSION = 1; } Rating: 5
-
12th Oct 2010, 05:42 PM #2MemberWebsite's:
litewarez.net litewarez.com triniwarez.comSession hijacking us nothing to do with the section of the session your working on
to prevent session hijacking see me other post: http://www.besthostingforums.com/showthread.php?t=44270Join Litewarez.net today and become apart of the community.
Unique | Clean | Advanced (All with you in mind)
Downloads | Webmasters
Notifications,Forum,Chat,Community all at Litewarez Webmasters
-
12th Oct 2010, 05:43 PM #3OPMember
k,Thank you litewarez.
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
Need RDP/VPS admin session
By SABRINE in forum Hosting DiscussionReplies: 0Last Post: 30th Oct 2012, 10:47 AM -
[help] Detect session on URL
By jomasaco in forum Web Development AreaReplies: 4Last Post: 28th Apr 2011, 05:20 PM -
Session Hijacking
By litewarez in forum Web Development AreaReplies: 17Last Post: 24th Aug 2010, 10:54 PM -
T20 WorldCup Betting Session
By -saMmy- in forum Useful SitesReplies: 26Last Post: 21st May 2010, 02:11 AM -
Webcam session with To0 :P
By CyberJ37 in forum General DiscussionReplies: 40Last Post: 22nd Dec 2009, 09:20 AM
themaManager - edit and manage...
Version 4.04 released. Open older version (or...