This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "snap-core".

The branch, master has been updated
       via  3f3b34b1f490c24df5d1bf2c70f3b914ae522216 (commit)
      from  214bdf39bf9de02ff05cdda764a4a7ac64cff4ac (commit)


Summary of changes:
 src/Snap/Util/FileServe.hs |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 3f3b34b1f490c24df5d1bf2c70f3b914ae522216
Author: Mighty Byte <[email protected]>
Date:   Sat Dec 11 08:50:52 2010 -0500

    Fixed first half of issue 36.

diff --git a/src/Snap/Util/FileServe.hs b/src/Snap/Util/FileServe.hs
index 8d98fce..11c94e0 100644
--- a/src/Snap/Util/FileServe.hs
+++ b/src/Snap/Util/FileServe.hs
@@ -170,7 +170,11 @@ defaultMimeTypes = Map.fromList [
 getSafePath :: MonadSnap m => m FilePath
 getSafePath = do
     req <- getRequest
-    let p = S.unpack $ rqPathInfo req
+    let mp = urlDecode $ rqPathInfo req
+
+    when (isNothing mp) pass
+
+    let p = maybe "" S.unpack mp
 
     -- relative paths only!
     when (not $ isRelative p) pass
-----------------------------------------------------------------------


hooks/post-receive
-- 
snap-core
_______________________________________________
Snap mailing list
[email protected]
http://mailman-mail5.webfaction.com/listinfo/snap

Reply via email to