mirror of
https://github.com/morluto/rea.git
synced 2026-11-19 13:12:26 +00:00
fix(ci): redact authentication in case-insensitive URL schemes
This commit is contained in:
1 parent
1cd471487b
commit
95eb175457
2 files changed
+8
-1
No files matched your search
@@ -1,6 +1,6 @@
|
||||
/** Redact only HTTP URL authentication; keep paths, names, queries and other text. */
|
||||
export function redactTransportAuthentication(text) {
|
||||
return text.replace(/https?:\/\/[^\s"<>\\]+/gu, (value) => {
|
||||
return text.replace(/https?:\/\/[^\s"<>\\]+/giu, (value) => {
|
||||
try {
|
||||
const parsed = new URL(value);
|
||||
if (!parsed.username && !parsed.password) return value;
|
||||
|
||||
Reference in new issue
Block a user