Making sure URLs are always lower-case.

This commit is contained in:
mike12345567 2021-01-14 17:31:17 +00:00
parent d7db539746
commit 09bf6833ed
3 changed files with 3 additions and 3 deletions

View File

@ -43,7 +43,7 @@
}
async function checkUrl(url) {
urlError = await checkValidation({ url }, urlValidation)
urlError = await checkValidation({ url: url.toLowerCase() }, urlValidation)
}
onMount(async () => {

View File

@ -72,7 +72,7 @@ async function getAppUrlIfNotInUse(ctx) {
} else {
url = encodeURI(`${ctx.request.body.name}`)
}
url = `/${url.replace(/\/|\\/g, "")}`
url = `/${url.replace(/\/|\\/g, "")}`.toLowerCase()
const hostingInfo = await getHostingInfo()
if (hostingInfo.type === HostingTypes.CLOUD) {
return url

View File

@ -29,7 +29,7 @@ function objectStoreUrl() {
async function checkForSelfHostedURL(ctx) {
// the "appId" component of the URL may actually be a specific self hosted URL
let possibleAppUrl = `/${encodeURI(ctx.params.appId)}`
let possibleAppUrl = `/${encodeURI(ctx.params.appId).toLowerCase()}`
const apps = await getDeployedApps()
if (apps[possibleAppUrl] && apps[possibleAppUrl].appId) {
return apps[possibleAppUrl].appId