changeset 5:a09d8bcdc0f9

lower case repos
author Franklin Schmidt <fschmidt@gmail.com>
date Wed, 18 May 2022 00:21:44 -0600
parents 028e74c8889d
children a6be8817c05b
files src/admin/add.html.luan
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
diff -r 028e74c8889d -r a09d8bcdc0f9 src/admin/add.html.luan
--- a/src/admin/add.html.luan	Thu May 12 16:54:11 2022 -0600
+++ b/src/admin/add.html.luan	Wed May 18 00:21:44 2022 -0600
@@ -1,5 +1,7 @@
 local Luan = require "luan:Luan.luan"
 local error = Luan.error
+local String = require "luan:String.luan"
+local to_lower = String.lower or error()
 local Io = require "luan:Io.luan"
 local Http = require "luan:http/Http.luan"
 local Shared = require "site:/lib/Shared.luan"
@@ -14,6 +16,7 @@
 local function handle()
 	local user = get_user()
 	local repo_name = Http.request.parameters.repo or error()
+	repo_name = to_lower(repo_name)
 	if repo_name=="_all" or repo_name=="_private" then
 		return [[<p error>Invalid rep name</p>]]
 	end