From ccd1bedd2f0865cdde79491a8ea171d78a38814e Mon Sep 17 00:00:00 2001 From: Emil Williams Date: Tue, 19 Aug 2025 16:41:19 +0000 Subject: [PATCH] I Break Everything I Touch --- gorillanest | 2 +- template/index.tt | 2 +- template/index_user.tt | 4 ++-- template/repository.tt | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/gorillanest b/gorillanest index ea85128..2d26d7f 100755 --- a/gorillanest +++ b/gorillanest @@ -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)}; diff --git a/template/index.tt b/template/index.tt index a2048a7..6c018d8 100644 --- a/template/index.tt +++ b/template/index.tt @@ -5,7 +5,7 @@

[% title %]

[% description %]

- + [% INCLUDE foot.tt %] diff --git a/template/index_user.tt b/template/index_user.tt index e27fb35..908acc7 100644 --- a/template/index_user.tt +++ b/template/index_user.tt @@ -1,9 +1,9 @@ -[% title = "${name} Index" %] +[% title = "${username} Index" %] [% INCLUDE head.tt %]

[% title %]

- + [% INCLUDE foot.tt %] diff --git a/template/repository.tt b/template/repository.tt index f11849a..c437075 100644 --- a/template/repository.tt +++ b/template/repository.tt @@ -1,5 +1,5 @@ -[% title = "/${name}/${repository}" %] +[% title = "/${username}/${repository}" %] [% INCLUDE head.tt %]

[% title %]

-- 2.39.5