I know all I need is the CoSign cookie, but it shouldn't hurt the connection to just post all available cookies, would it?
Thanks for the code snippet, I'll have to try that and see if it helps! -Brendan On Tue, Aug 16, 2011 at 3:28 AM, Martin Sucha <[email protected]>wrote: > Hi, > > On Mon, 2011-08-15 at 17:12 -0400, Brendan Dailey wrote: > > So let's say I'm on a page that is authenticated via CoSign on a > > server. I then run a script that tries to grab the same CoSign > > authenticated page's contents. > [...] > > I assumed attaching all currently set cookies would fix the problem > > since CoSign uses session cookies, but to no avail. Below is a sample > > of my curl code. I know this isn't a PHP forum, but it appears to only > > be affecting CoSign sites. > You actually only need to set the service cookie, with the value of > strtr($_COOKIE[strtr($_SERVER['COSIGN_SERVICE'], '.', '_')], ' ', '+') > > > > > $fname = '/home/temp/cookies.txt'; > > if( $stream = fopen($fname, 'w') ) { > > fwrite($stream, $_SERVER['HTTP_COOKIE']); > > } > This does not look right, the cookie file used by curl uses another > format. > > We use this snippet to write the cookie file: > $cookieLine = $domain."\t".($tailmatch?'TRUE':'FALSE')."\t"; > $cookieLine .= $path."\t".($secure?'TRUE':'FALSE')."\t"; > $cookieLine .= $expire."\t".$name."\t".str_replace(' ', '+',$value); > $cookieLine .= "\n"; > > Hope this helps. > > Regards, > Martin Sucha > > -- Brendan Dailey ITS/SITES Print Team - Student Developer President of the Catholic Student Association University of Michigan [email protected]
------------------------------------------------------------------------------ uberSVN's rich system and user administration capabilities and model configuration take the hassle out of deploying and managing Subversion and the tools developers use with it. Learn more about uberSVN and get a free download at: http://p.sf.net/sfu/wandisco-dev2dev
_______________________________________________ Cosign-discuss mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/cosign-discuss
