session-cookies

Multiple session on Separate WebViews - Android

懵懂的女人 提交于 2019-12-10 11:57:57
问题 I would want to log into two separate Gmail accounts within the two webViews at the same time. The problem I am having is that once I log into an account on webView1, webView2 follows suit and logs me into that account. The same problem happens when I log into webView2, as webView1 logs into that account also naturally. Is there any way to get around this? I want my two webViews to act completely independently from one another is what it comes down to. Thanks! Here is a code String Cookies0;

Set individual maxAge for sessions when using cookieSession() in connect/express

情到浓时终转凉″ 提交于 2019-12-10 11:29:49
问题 I am trying to use connect/express cookieSession() in order to store my node.js sessions in cookies (and thus, avoiding a server-side session store). This would help me to 'remember' the user when they log in and keep sessions alive even after server restarts. I would like to do this with cookieSession() : app.use( express.cookieSession( { secret: 'secret_key' } ) ); app.use( function (req, res, next) { if ( req.method == 'POST' && req.url == '/login' ) { if ( req.body.remember ) { req

How to protect web application from cookie stealing attack?

☆樱花仙子☆ 提交于 2019-12-10 11:29:39
问题 My web application's authentication mechanism currently is quite simple. When a user logs in, the website sends back a session cookie which is stored (using localStorage ) on the user's browser. However, this cookie can too easily be stolen and used to replay the session from another machine. I notice that other sites, like Gmail for example, have much stronger mechanisms in place to ensure that just copying a cookie won't allow you access to that session. What are these mechanisms and are

Session issue in wkhtmltopdf

眉间皱痕 提交于 2019-12-10 11:09:32
问题 Hi, I am converting HTML to pdf through wkhtmltopdf library, here session is behaving very differently that if we set the session when our link is called then it works fine but our previously set session is not getting? exec('C://"Program Files"//wkhtmltopdf.exe ' . 'http://localhost/test.php?a=351' . ' ' . $file_name . ''); Problem: Session set in test.php is available in this page when printing the page. But if we set the session in some previous page i.e test2.php then that value is null

Unable to create session in php on AJAX call

风格不统一 提交于 2019-12-10 11:06:11
问题 I have a example.com/login.php file on root domain with this code header('Access-Control-Allow-Origin: *'); session_set_cookie_params(0, '/', '.example.com'); session_name('lusession'); session_start(); $_SESSION['name'] = $_GET['name']; $_SESSION['useremail'] = $_GET['useremail']; $_SESSION['password'] = $_GET['password']; This file is provided with credentials and it then creates login session. It is called from main domain and subdomains by AJAX. The problem is it doesnot creat session

Is it possible to manually end a Google Analytics Session?

社会主义新天地 提交于 2019-12-10 03:48:56
问题 I would like to divide the traffic between registered and unregistered users with a custom variable. The Analytics documentation suggests to use a session-level custom variable for this purpose. However, what is very common for our users is to log out when they are done using our service, because they are often working on shared computers. At log out, the session-level custom variable would be overwritten by 'unregistered', because this happens in the same session. Is it somehow possible to

PhoneGap session (cookies) on iOS

匆匆过客 提交于 2019-12-10 02:06:12
问题 On server we have a set of JSON APIs. There's a login method that authenticates the user and creates user session. Subsequent calls to other methods on the API assume that the user is authenticated. On client side we have PhoneGap and jQuery mobile. We use ajax calls to communicate with server. On Android session management is OK, but on iOS after login it seems like the session cookie is not sent back on next call (or is not accepted at all) and the calls fail on server as if the user is not

Destroy a PHP session on clicking a link

假如想象 提交于 2019-12-09 16:13:47
问题 Is this code valid? <a href="#" onclick="<?php session_destroy();?>">Logout</a> 回答1: No it is not a valid code. It will destroy the session at the time of loading the php page. For destroying session on click you should write <a href="logout.php" >Logout</a> in logout.php session_destroy(); 回答2: Make a page called logout.php Logout.php_ _ ___ <?php Session_start(); Session_destroy(); header('Location: ' . $_SERVER['HTTP_REFERER']); ?> Your page_ _ ____ <a href="Logout.php">Logout</a> 回答3:

Keeping a session when using HttpWebRequest

风流意气都作罢 提交于 2019-12-09 16:04:17
问题 In my project I'm using C# app client and tomcat6 web application server. I wrote this snippet in the C# client: public bool isServerOnline() { Boolean ret = false; try { HttpWebRequest req = (HttpWebRequest)HttpWebRequest.Create(VPMacro.MacroUploader.SERVER_URL); req.Method = "HEAD"; req.KeepAlive = false; HttpWebResponse resp = (HttpWebResponse)req.GetResponse(); if (resp.StatusCode == HttpStatusCode.OK) { // HTTP = 200 - Internet connection available, server online ret = true; } resp.Close

Rails 4 upgrade JSON::ParseError for old sessions

梦想与她 提交于 2019-12-09 15:06:36
问题 After upgrading to Rails 4.1.4 from Rails 3.2, accessing the application with an existing session (from the older Rails 3.2 version) causes an internal server error. backtrace: JSON::ParserError - 795: unexpected token at { I"session_id:ETI"%fa78a4ee07ac952c9b034ebc6199f30b;': /Users/.../.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/json/common.rb:155:in `parse' actionpack (4.1.4) lib/action_dispatch/middleware/cookies.rb:388:in `load' actionpack (4.1.4) lib/action_dispatch/middleware/cookies.rb:428