From: Brian Warner Date: Sat, 25 Aug 2007 19:05:06 +0000 (-0700) Subject: webish: strip leading/tailing whitespace from user-provided URIs X-Git-Url: https://git.rkrishnan.org/%5B/%5D%20/uri/index.php?a=commitdiff_plain;h=44db5fd8a2b5053b894ca2bdd8e1e71ae9809277;p=tahoe-lafs%2Ftahoe-lafs.git webish: strip leading/tailing whitespace from user-provided URIs --- diff --git a/src/allmydata/webish.py b/src/allmydata/webish.py index 703f9a10..633aef7e 100644 --- a/src/allmydata/webish.py +++ b/src/allmydata/webish.py @@ -616,9 +616,9 @@ class POSTHandler(rend.Page): if not name: raise RuntimeError("set-uri requires a name") if "uri" in req.args: - newuri = req.args["uri"][0] + newuri = req.args["uri"][0].strip() else: - newuri = req.fields["uri"].value + newuri = req.fields["uri"].value.strip() d = self._check_replacement(name) d.addCallback(lambda res: self._node.set_uri(name, newuri)) def _done(res):