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

Merge pull request #32959 from overleaf/ab-fix-32861-spam-safe-project-name

[saas-e2e] Fix project name generation still producing + and / characters

GitOrigin-RevId: 2367c8d45ee9ec4441e9ee2a1d74c2fd281f9e90
Alexandre Bourdin 3 месяцев назад
Родитель
Сommit
77b9d2fd1b
1 измененных файлов с 2 добавлено и 1 удалено
  1. 2 1
      server-ce/test/helpers/project.ts

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

@@ -245,7 +245,8 @@ 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('/', '_')
+      .replaceAll('/', 'x')
+      .replaceAll('+', 'y')
       .slice(0, 10)
     const nDigits = (name.match(/\d/g) || []).length
     if (nDigits < 6) return name