From 44db5fd8a2b5053b894ca2bdd8e1e71ae9809277 Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Sat, 25 Aug 2007 12:05:06 -0700 Subject: [PATCH] webish: strip leading/tailing whitespace from user-provided URIs --- src/allmydata/webish.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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): -- 2.45.2