git ssb

30+

cel / git-ssb-web



Commit ef4b4f342c9b73014f992041ce0a43c123f31146

Handle requests to unescaped ssb refs

e.g. image blobs referenced in markdown with slashes in their id
Charles Lehner committed on 3/29/2016, 2:43:28 AM
Parent: 87a92b12f3bb2fcd5f7cf0890137360f32e0375d

Files changed

index.jschanged
index.jsView
@@ -386,9 +386,11 @@
386386 }
387387
388388 function handleRequest(req) {
389389 var u = req._u = url.parse(req.url, true)
390- var dirs = u.pathname.slice(1).split(/\/+/).map(tryDecodeURIComponent)
390 + var path = u.pathname.slice(1)
391 + var dirs = ref.isLink(path) ? [path] :
392 + path.split(/\/+/).map(tryDecodeURIComponent)
391393 var dir = dirs[0]
392394
393395 if (req.method == 'POST') {
394396 if (isPublic)

Built with git-ssb-web