cookies

Troubleshooting "Request Entity Too Large" (HTTP 413) error message returned to browser

Occasionally users of our web application encounter the following error message: Request Entity Too Large The requested resource /ourapp/ourlocation/ does not allow request data with GET requests, or the amount of data provided in the request exceeds the capacity limit. We checked our logs, but we were unable to find any entries that ...

unEscape JavaScript escaped value in JAVA

in our web service we set a cookie through JavaScript wich we read again in Java (Servlet) however we need to escape the value of the cookie because it may contain illegal characters such as '&' which messes up the cookie. is there a transparent way to escape (JavaScript) and unescape again (JAVA) for this? thanks, Pieter Goddijn ...

multilingual php script question

Hi folks. I have this PHP script. It's the only one that really worked to me: <?php /*Check_if_user_has_changed_language: */ if(isset($lang)){/*If_so:*/ setcookie("ling",$lang,time()-60*60*24*365,"/",".sayip.info",0);/*Wipe_previous_cookie*/ setcookie("ling",$lang,time()+60*60*24*365,"/",".sayip.info",0);/*Whatever_the_means_l...

Best way to implement 'remembering' multiple values in a web app

In poll sites, a user (not logged in) can vote on a question only once. How does the web app 'remember' that the user has already answered a particular question? one way is to set a cookie for every question she answers. another way to save the question id in the session. we could also store the value in a db, along with the session ...

How do you remove a Cookie in a Java Servlet

How do you remove a cookie in a Java servlet? I tried this: http://www.jguru.com/faq/view.jsp?EID=42225 EDIT: The following now works successfully it appears to be the combination of: response.setContentType("text/html"); and cookie.setMaxAge(0); Before I was doing: //remove single signon cookie if it hasn't been validated yet r...

Where do i 'setcookie' to record http_referer in Drupal 6?

I've got my php working to set a cookie storing the http_referer the visitor came from, but how(or where) do i put this code in my Drupal theme/installation, to make it set cookie when a visitor first lands on my Drupal site? ...

Destroy cookies in rails, facebook connect, facebooker plugin

So I have sort of a weird situation going on. I am using the Facebooker plugin for rails where I want users to be able to login and logout with their facebook profiles. However, once users logout, if I refresh the page, it logs them back in. This is only when users log in with facebook connect. I think the problem is that a rogue coo...

how to get the cookies from a php curl into a variable

So some guy at some other company thought it would be awesome if instead of using soap or xml-rpc or rest or any other reasonable communication protocol he just embedded all of his response as cookies in the header. I need to pull these cookies out as hopefully an array from this curl response. If I have to waste a bunch of my life wri...

Replay attacks with cookie session : Rails 2.0

I'm using rails 2.0.5 with cookie session. but cookie session has serious problem wis the possibility of replay attacks. How do I prevent replay attacs with cookie store? I hope a plug in of Rails 2.0 use or concrete source example codes. Could you help me? more information more information ...

cross domain "cookie-ing" the master site is not my own

I currently have an apartment database website I pay for "http://www.apartmentdata.com/?SITEID=38207" This is the beginning of the search process. I am making my own custom site and I want it to have links that go directly to apartments, or any page past the initial search page. None of these will open unless the initial search page is o...

RESTful Authentication: Stumped trying to do simple redirect on cookie based authentication

I have a RoR application that's using the RESTful Authentication plug-in. Everything works great. I recently enabled cookie based authentication and that works fine too. The problem is that I want to change the default landing page when the user is authenticated using a cookie. I want to have a cookie authenticated user redirected to ...

Vulnerability with encrypting cookie info for authentication (stack overflow podcast).

I was listening to the stackoverflow podcast (i think it was episode 52). Jeff was talking how they came up with some type of authorization mechanism where they were encrypting credentials in the cookie they sent to the client. Apparently someone Jeff knows was able to find a hole in this and was able to login with anyones id that he wan...

Calling authenticated web service from windows mobile app - need access to cookie container

Hi, I'm writing a Windows mobile client that needs to call a web service. The web service has a login method that returns a session id in a cookie. I've written a quick test app using normal winforms and I can access the web service cookiecontainer property without any problem In my windows mobile project (C# .net 2.0 targeting window...

C#, Webbrowser control: How to delete Cookies from windows.form?

I am working with the Webbrowser control on a windows.form application written in C#. I would like to write a method for deleting the cookies from the Webbrowers control after it visits a certain site. Unfortunately, I don't know how to do that exactly and haven't found alot of help on the internet. If anyone has experience actually doi...

how to see cookie information of chrome browser?

Is there such a plugin? ...

creating a cookie failing with safari, chrome, ie but working with FF

We are using the following code to create the security cookie. Everything works fine in Staging environment, however in the production environment the following code is unable to create a cookie in Safari, Chrome or IE but it does create a cookie successfully in Firefox. anything that you guys think i am missing or is wrong in here ? pu...

How can I persist a session in an iframe?

Suppose I have a web app that I want to embed into any other site using an iframe. The iframe references my site and operates independently of the hosting web page. Well, the browser considers the iframe to be a third party site, therefore its session cookie is considered a third party cookie. Some methods exist to make the browsers h...

Using cookies with python to store searches

Hey i have a webpage for searching a database. i would like to be able to implement cookies using python to store what a user searches for and provide them with a recently searched field when they return. is there a way to implement this using the python Cookie library?? ...

Python Cookies question

import cgitb import Cookie, urllib2 from cookielib import FileCookieJar cgitb.enable() c = Cookie.SmartCookie() c['ini'] = 1 savedc = FileCookieJar() savedc.add_cookie_header(c.output()) savedc.save() shoulden't this save the cookie?... i've been reading over the python documentation like 1 million times, i just don't get it :( pleas...

Retrieving Cookies python

hello, i've figured out how to save cookies in python, but how do i read them back?.. ...