]> git.xolatile.top Git - gorillanest.git/commitdiff
I Break Everything I Touch
authorEmil Williams <emilemilemil@cock.li>
Tue, 19 Aug 2025 16:41:19 +0000 (16:41 +0000)
committerEmil Williams <emilemilemil@cock.li>
Tue, 19 Aug 2025 16:41:19 +0000 (16:41 +0000)
gorillanest
template/index.tt
template/index_user.tt
template/repository.tt

index ea851282da0b1d337e2a8909e5bba6e6ea9b549d..2d26d7f56939a7855cf2380333e3ef1dad4bcb29 100755 (executable)
@@ -81,7 +81,7 @@ try {
         if ($method eq 'HEAD') {
             $head = 1;
         } elsif ($method eq 'GET') {
-            ($data{username}, $data{repository}) = $uri =~ m{/([a-zA-Z0-9_]+?)/(?:([a-zA-Z0-9_.]+))?}; # [[:alnum:]] didn't work
+            ($data{username}, $data{repository}) = $uri =~ m{^/([a-zA-Z0-9_]+)(?:/([a-zA-Z0-9_\.]+))?$}; # [[:alnum:]] didn't work
             info("name:", $data{username} || '', "repo:", $data{repository} || '');
             if ($uri eq '/') {
                 %data = %{GN::index($public, \%data)};
index a2048a77c7dc0e9f49276102112f35e4b8485598..6c018d8b02df58076f3bc74002a5b6afee2c206c 100644 (file)
@@ -5,7 +5,7 @@
 <body>
 <h1>[% title %]</h1>
 <h2>[% description %]</h2>
-<ul>[% FOR i IN directories %]<li><a href="/[% i %]/">/[% i %]</a></li>[% END %]</ul>
+<ul>[% FOR i IN directories %]<li><a href="/[% i %]">/[% i %]</a></li>[% END %]</ul>
 </body>
 [% INCLUDE foot.tt %]
 </html>
index e27fb35e011a919fbeec74d29f29b72f9b75fa2e..908acc7d30dc1d142457e08a90d45d376c662cea 100644 (file)
@@ -1,9 +1,9 @@
 <html>
-[% title = "${name} Index" %]
+[% title = "${username} Index" %]
 [% INCLUDE head.tt %]
 <body>
 <h1>[% title %]</h1>
-<ul>[% FOR i IN directories %]<li><a href="/[% name %]/[% i %]">/[% name %]/[% i %]</a></li>[% END %]</ul>
+<ul>[% FOR i IN directories %]<li><a href="/[% username %]/[% i %]">/[% username %]/[% i %]</a></li>[% END %]</ul>
 </body>
 [% INCLUDE foot.tt %]
 </html>
index f11849aab1b42bd105aa5e80b0033f28a55898ea..c437075a95596f0a39d4b13ff0439f1048949ada 100644 (file)
@@ -1,5 +1,5 @@
 <html>
-[% title = "/${name}/${repository}" %]
+[% title = "/${username}/${repository}" %]
 [% INCLUDE head.tt %]
 <body>
   <h1>[% title %]</h1>