session-variables

Session after login and the possible of hacking

亡梦爱人 提交于 2019-12-11 10:06:07
问题 I want to know once and for all in classic ASP! if i have a form like this <form action="login.asp" method="post"> <input type="text" name="username" value="" /> <input type="password" name="password" value="" /> </form> and in the login.asp page i check if the username and password are correct i give a session("loggedin") a value then in everypage i check for that session and for that value my question - is that the right, most common secure thing to do??? or i miss something? 回答1: I am

PHP Session variables not saving between pages?

邮差的信 提交于 2019-12-11 08:56:01
问题 Login page: <?php session_start(); #echo session_id (); $_SESSION["auth"]= "yes"; echo '<a href="Portaltest.php?t='.time().'">portal page link. Auth set to: {$_SESSION["auth"]}</a>'; ?> Portal page: <?php session_start(); echo "auth = {$_SESSION["auth"] } <BR />"; echo session_id (); ?> The auth session is lost between the two pages somehow! Edit Here is a test url: http://proserv01.services.lyris.com/NFPInsurance/UnsegmentedMemberReport/logintest.php 回答1: When trouble-shooting sessions,

PHP Session Variables Not Saved in Centos Linux?

无人久伴 提交于 2019-12-11 08:24:16
问题 I am having this PHP script that fails to save the session variable when I hit submit in my PHP Version 5.1.6 linux centos system. This problem happens over time. Currently I temporary solve this problem with PHP by rebooting the machine. However, this is not a good solution. It is just a temporary solution. Here is PHP Session info: Directive Local Value Master Value session.auto_start Off Off session.bug_compat_42 Off Off session.bug_compat_warn On On session.cache_expire 180 180 session

Session variable value changes between page processing somehow

放肆的年华 提交于 2019-12-11 08:17:45
问题 I have a script that processes a search query. The results are returned with a sortable header, so clicking on the Lot # column title would sort the results by the lot # ASC. However, if you had already sorted it ASC (which this is stored in a session variable), it will change it to sort it by the lot # DESC (and update that session variable). All of this works perfectly, so long as thumbnails are not included in the search results. When I do include them (which all that does is change the

$_SESSION variables don't get saved when automatically logged in

佐手、 提交于 2019-12-11 06:27:25
问题 I have an iPhone application that communicates with a database which includes things like users data (i.e. username, email, password), I created a PHP API for that and I connect to that API in the iPhone app. My problem here is: I save the user id in $_SESSION to restore it later when needed, when I manually log in, $_SESSION variables get saved easily and I can call them whenever I want, but when the app automatically logs in (which is obviously after the first log in where username and

PHP session not saved after curl call

被刻印的时光 ゝ 提交于 2019-12-11 06:07:39
问题 I need to authenticate my user through a curl script session_start(); $_POST["username"]= "user"; $_POST["password"]= "password"; $ch = curl_init(); $url = 'signin.php'; curl_setopt($ch,CURLOPT_URL, $url); curl_setopt($ch,CURLOPT_POST, count($_POST)); curl_setopt($ch,CURLOPT_POSTFIELDS, $_POST); curl_setopt($ch,CURLOPT_RETURNTRANSFER,1); $result = json_decode(curl_exec($ch),true); curl_close($ch); The signin.php makes another curl call to an api, I made sure that signin.php returns all

How to securely set session variables for logging someone in?

痞子三分冷 提交于 2019-12-11 05:59:37
问题 I have a few questions here if anyone can help me out. First off, I am in the process of creating a login system for users of my application. I am using shared hosting (dreamhost), and I am wondering, after the user logs in and it is successful, how can i verify if the user is logged in on pages? I am assuming that i use session variables, but the user's name needs to be stored for certain purposes. Is it safe to store the user's name in a session variable, and is it secure to basically just

simple login page and dynamically hiding controls based on session variable

亡梦爱人 提交于 2019-12-11 04:34:18
问题 I think my question revolves around me not having a comfortable grasp of page life cycle in ASP.net still unfortunately. Ive read a lot but its a lot to take in, sorry! anyways im trying to make a super simple page as a proof of concept for what I will do across the entire site so first I will just post what I have: ASPX: <asp:Button ID="btnLogin" runat="server" Text="Login" onclick="btnLogin_Click" /> <hr /> <asp:Label ID="Label1" runat="server" Text="Regular User"></asp:Label> <asp:TextBox

Sharing variables between an asp.net page and a background thread created by the page

一笑奈何 提交于 2019-12-11 02:12:02
问题 I've a long running task in my asp.net web application and hence I run that task in a new thread and constantly poll to check the status of the thread (by using a ticker control which ticks every 5 seconds and postbacks to the server and checks the status of the thread). I used the Session State to share the variables between the thread and the page. But I learned that it is a bad practice to access the session from a background thread. What is the best method to share variables between a

Store $_POST in Yii2 session

断了今生、忘了曾经 提交于 2019-12-11 02:11:49
问题 I'm having a little trouble with my quiz form. I'm using a page to show a single question that a user answers, from there I was hoping to save the question id and option id (My form is multiple choice, i set the options). My HTML looks like this: <input type="radio" name="question[3]" value="4">My Answer When the form is posted I am doing this if(isset(Yii::$app->session['question'])){ // Get posted array $question = $_POST['question']; Yii::$app->session['question'] = $question; print_r(Yii: