fix(security): restrict link protocols to http and https (#1888)
This commit is contained in:
1 parent
80c02ef9f2
commit
a12dd10269
5 files changed
+41
-4
No files matched your search
@@ -5,7 +5,7 @@ import type { SearchEngineType } from "@homarr/definitions";
|
||||
|
||||
const genericSearchEngine = z.object({
|
||||
type: z.literal("generic" satisfies SearchEngineType),
|
||||
urlTemplate: z.string().min(1).startsWith("http").includes("%s"),
|
||||
urlTemplate: z.string().min(1).startsWith("http").includes("%s"), // Only allow http and https for security reasons (javascript: is not allowed)
|
||||
});
|
||||
|
||||
const fromIntegrationSearchEngine = z.object({
|
||||
|
||||
Reference in new issue
Block a user