Skip to content

Commit

Permalink
Keep URL as is instead of lower casing them
Browse files Browse the repository at this point in the history
  • Loading branch information
soulgalore committed Jun 18, 2024
1 parent e437b57 commit 7693aee
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion server/src/middleware/validatescripting.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const validateScripting = (request, response, next) => {
return urlMatch[0].slice(1, -1);
});
for (let url of urls) {
if (isURL(url.toLowerCase())) {
if (isURL(url)) {
const urlObject = new URL(url);
if (validRegEx.test(urlObject.hostname) === false) {
logger.error(
Expand Down
2 changes: 1 addition & 1 deletion server/src/middleware/validateurl.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const validateURL = (request, response, next) => {
url = 'https://' + url;
}

if (url === 'undefined' || !isURL(url.toLowerCase())) {
if (url === 'undefined' || !isURL(url)) {
logger.error('Non valid URL %s', url);
request.inputValidationError = getText('error.urlnotvalid', url);
return next();
Expand Down
4 changes: 2 additions & 2 deletions server/src/util/add-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ export async function addTest(request) {

await testRunnerQueue.add(
{
url: url.toLowerCase(),
url: url,
config,
extras,
scripting,
Expand Down Expand Up @@ -206,7 +206,7 @@ export async function addTestFromAPI(

await testRunnerQueue.add(
{
url: url.toLowerCase(),
url,
config,
scripting,
scriptingName,
Expand Down

0 comments on commit 7693aee

Please sign in to comment.