Просмотр исходного кода

[e2e] Prevent slashes in generated project names (#28835)

* Prevent slashes in generated project names by using base64url encoding (replaces `+` and `/` by `-` and `_`)

* Keep base64 (Missing baseUrl in compilerOptions) and replace the slash manually

GitOrigin-RevId: 62217873de8d1e00e72927a5195338ad92c09769
Antoine Clausse 10 месяцев назад
Родитель
Сommit
72c02bbd98
1 измененных файлов с 1 добавлено и 0 удалено
  1. 1 0
      server-ce/test/helpers/project.ts

+ 1 - 0
server-ce/test/helpers/project.ts

@@ -141,6 +141,7 @@ export function getSpamSafeProjectName() {
     // Move from hex/16 to base64/64 possible characters per char in string
     const name = Buffer.from(uuid().replaceAll('-', ''), 'hex')
       .toString('base64')
+      .replace('/', '_')
       .slice(0, 10)
     const nDigits = (name.match(/\d/g) || []).length
     if (nDigits < 6) return name