I have a perl script where after fetching a page I need to add a cookie to an already existing cookiejar with cookies in it already. how do I go about doing this? I'm hoping for a python mechanize style .set_cookie() function
...
When using Google Website Optimizer A/B split test, is there a way I can read a cookie to see which version A or B did the user get? I need to know this from a page other than the control page.
...
I have a C# custom application that obtains a cookie using OpenID in the following way::
using System;
using System.Windows.Forms;
namespace MyNamespace
{
public class SignIn : Form
{
private WebBrowser _browser;
public SignIn()
{
InitializeComponent();
}
private void SignIn...
In my website, some of users complain about problems in logging in.
Their browsers generally don't see session info and cannot understand that the user is logged in, and behave like never logged in. But after some refresh, browser see session info and show the user as logged in normally. Again, if the user try to do some action( like w...
I came across this example from Ruby's security page (http://guides.rubyonrails.org/security.html). It poses this scenario:
A user receives credits, the amount is stored in a session (which is a bad idea anyway, but we’ll do this for demonstration purposes).
The user buys something.
His new, lower credit will be stored in the session.
...
I have a DotNetNuke website that by default people use anonymously. When they want to login they click a link which takes them to /DesktopModules/AuthenticationServices/ActiveDirectory/WindowsSignin.aspx and then redirects them back to the front page.
On the front page is some jQuery which is designed to change the cookies created durin...
Hi, I'm trying to find a javascript method to delete flash cookies on a page, but with no luck.
I know it can be obviously done through flash or flex, but the problem is I know nothing about flash, flex and actionscripts...So my question is: Is there a way to just load a prebuilt flash movie in a page, which just programmatically deletes...
I am working off of the example code given by Anthony Briggs. However it doesn't seem to save the cookies back into the defined cookie file.
My modified code. I switched to using LWPCookieJar because its supposedly fully compatible and also removed the login code into a separate function so that I can first test if I am login, and then ...
OK, so I have this pretty cool Mario-themed media player, created by the customization of the immensely powerful jQuery plugin, jplayer.
So, I would like to give the option to the user to choose whether he or she would like to have auto-starting music play in the background of the website.
I have it off by default, as this is supposed ...
I am saving a cookie value and then trying to send it back with a later request to use for authentication... it doesn't seem to be working.
NSString *savedCookie = [savedData objectForKey:@"savedLoginCookie"];
NSMutableURLRequest *requestObj = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:urlAddress]];
[requestObj addVa...
I have a rails controller I dont ever want to set a cookie. I production, all it's actions are basically page cached and served as static files. But in development it's responses are generated on each request so that we can change things on the fly and test it out.
The problem is that when we have parallel requests that change cookie d...
Hey guys,
I have a question about sessions. How do you make a secure login session/cookie.
I was looking at this example where they add this array to the session:
$data = array{
username = $_POST['username'];
is_logged = true;
}
I was wondering if this is enough? Is it not possible to change the username in the cookie to an...
Is this Python script correct?
import urllib, urllib2, cookielib
username = 'myuser'
password = 'mypassword'
cj = cookielib.CookieJar()
opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj))
login_data = urllib.urlencode({'username' : username, 'j_password' : password})
opener.open('http://www.example.com/login.php', l...
I have a login system. How can I implement a secure remember me system using cookies.
What value should I have to store in cookie username and password, but how I can secure it?
...
Hi, I need to set a cookie to keep user login state. I'm going to hash username, password and IP. My code:
login process:
$hashed = md5($username.$pwd.IP);
setcookie('userstate', $username.':'.$hashed);
restore user state:
$vars = split(':', $_COOKIE['userstate']);
pseudo: get user with username in $vars[0]
$hashed = md5($username.$pwd...
Normally, we set the cookie with a single max_age as following:
response.set_cookie('name1', 'value1', max_age=3600*24*365)
response.set_cookie('name2', 'value2', max_age=3600*24*365)
response.set_cookie('name3', 'value3', max_age=3600*24*365)
Note, we set the max_age again and again. How to set a default max_age to all cookies that d...
I have a UIWebView, and I don't want it to store an cookies, so just before the webview is loaded I do:
NSArray* cookies = [[NSHTTPCookieStorage sharedHTTPCookieStorage] cookies];
for (NSHTTPCookie *cookie in cookies) {
[[NSHTTPCookieStorage sharedHTTPCookieStorage] deleteCookie:cookie];
}
Checking the count of cookies is 0 so the...
We had a situation where sessions were being re-started immediately after logging in to a CakePHP app over SSL. It was pretty much as described here:
http://stackoverflow.com/questions/308659/session-not-saving-when-moving-from-ssl-to-non-ssl
and the original author's suggestion fixed the issue (although we'll try to implement somethin...
I was using the code below to delete cookies and everything worked fine.
A few days ago, I began hosting the code somewhere else and it will not longer delete the cookie.
Any ideas?
if( $_COOKIE )
{
foreach( $_COOKIE as $name => $value )
{
$params = session_get_cookie_params();
unset($_COOKIE[$name]);
...
Hello.
I'm trying to integrate authentication between WPF application and Silverlight application.
The users will login in the WPF app first, and they should be authenticated when they run the silverlight app from the browser.
The silverlight app is using forms authentication.(through WCF RIA Service)
The main application is Silverligh...