1
0
Fork 0
mirror of synced 2024-10-03 10:36:59 +13:00

Making sure URLs are always lower-case.

This commit is contained in:
mike12345567 2021-01-14 17:31:17 +00:00
parent cfe3c6e3d2
commit d820e3287e
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