summaryrefslogtreecommitdiff
path: root/sys/src/cmd/webcookies.c
AgeCommit message (Collapse)Author
2015-11-30webcookies: strdup() file argument to avoid crash (thanks mischief)cinap_lenrek
mischief reports: acid: lstk() abort()+0x0 /sys/src/libc/9sys/abort.c:6 ppanic(p=0x1bff4,fmt=0x1d749)+0x146 /sys/src/libc/port/malloc.c:166 pv=0x1dad8 msg=0x1e4a8 v=0x3ffffe7c n=0x2f D2B(p=0x1bff4,v=0x3fffffae)+0x57 /sys/src/libc/port/pool.c:926 a=0x3fffffa4 poolfreel(v=0x3fffffae,p=0x1bff4)+0x20 /sys/src/libc/port/pool.c:1152 ab=0x1dad8 poolfree(p=0x1bff4,v=0x3fffffae)+0x3b /sys/src/libc/port/pool.c:1287 free(v=0x3fffffb6)+0x23 /sys/src/libc/port/malloc.c:250 readjar(file=0x3fffffb6)+0xce /sys/src/cmd/webcookies.c:473 jar=0x1ea28 lock=0x1ea68 p=0x1ea6d main(argv=0x3fffffa0,argc=0x0)+0x10f /sys/src/cmd/webcookies.c:1295 file=0x3fffffb6 srv=0x0 mtpt=0x1cfd0 _argc=0x66 _args=0x1cfe0 home=0x0 _main+0x31 /sys/src/libc/386/main9.s:16 acid:
2015-08-03webcookies: fix typocinap_lenrek
2015-08-03webcookies: use strtol() to parse HH:MM:SScinap_lenrek
atoi() currently interprets leading zeros as octal (BUG!), so use strtol with explicit base 10 avoiding the issue.
2015-08-01webcookies: create lockfile with 0600 permission, always use create() with ↵cinap_lenrek
perm 0600 for rewriting jar
2015-07-31webcookies: fix implicit path cookie handlingcinap_lenrek
parsecookie() used to inplace modify the request path for implicit path (to get the directory from path) and also did it wrong. now have a static copy and do not remove the last slash.
2015-07-29webcookies: fix isdomainmatch() (fixes livejournal.com login)cinap_lenrek
when cookie is domain=example.com, then we implicitely add dot to the domain name, which made us reject the cookie as the request domain "example.com" != ".example.com". fix by making isdomainmatch() skip the implicit dot in pattern before string comparsion.
2015-01-16webcookies: only sync the jar when dirty on clunkcinap_lenrek
avoid sync the jar file when fids get clunked. the only reason to sync the jar on clunk is when it has been marked dirty (cookies added or deleted) and we want to flush the changes to disk.
2015-01-16webcookies: avoid rereading and rewriting the cookie jar file all the time, ↵cinap_lenrek
dont return deleted cookies on search - rewrite when jar->dirty != 0 (caller modified the in memory jar) - reread when the jar->qid != stat(jar->file)->qid (on disk file changed) - ignore deleted cookies in cookiesearch()
2013-05-26add leading dot for explicit domain in webcookies, bump redirection limit to ↵cinap_lenrek
12 in webfs
2012-08-17webcookies: create $home/lib/webcookies as 0600cinap_lenrek
2011-12-29webcookies: fix memory leak, remove fragment from urlcinap_lenrek
2011-03-30Import sources from 2011-03-30 iso image - libTaru Karttunen
2011-03-30Import sources from 2011-03-30 iso imageTaru Karttunen