changelog shortlog tags branches files raw gz bz2 help

Mercurial > hg > plan9front / changeset: webfs: do not send credentials in automatic referer url

changeset 4343: 6d999c39a9f0
parent 4342: 74455da2d86a
child 4344: 72a84fe2d6b4
author: cinap_lenrek@felloff.net
date: Sat, 14 Mar 2015 01:09:37 +0100
files: sys/src/cmd/webfs/fs.c
description: webfs: do not send credentials in automatic referer url
     1.1--- a/sys/src/cmd/webfs/fs.c
     1.2+++ b/sys/src/cmd/webfs/fs.c
     1.3@@ -421,6 +421,11 @@ fsopen(Req *r)
     1.4 						u->host = smprint("%H", r);
     1.5 						free(r);
     1.6 					}
     1.7+
     1.8+					/* do not send credentials */
     1.9+					free(u->user); u->user = nil;
    1.10+					free(u->pass); u->pass = nil;
    1.11+
    1.12 					if(r = smprint("%U", u)){
    1.13 						cl->hdr = addkey(cl->hdr, "Referer", r);
    1.14 						free(r);