* [web] reject upload requests without a file path
* [web] update copy on error message and link to contact form
Co-authored-by: Kamal Arkinstall <kamal.arkinstall@overleaf.com>
* [web] update copy: move dot to the end
---------
Co-authored-by: Kamal Arkinstall <kamal.arkinstall@overleaf.com>
GitOrigin-RevId: ba1ee81a91b046540caeb2f3f3da0e305611b35f
* In tests, post to `/user/emails/secondary` (6-digits) instead of the deprecated `/user/emails` (link-token)
* Update `addEmailAndConfirm` so it calls the right endpoint
* Remove unnecessary `userId` from `confirmEmail` and `addEmailAndConfirm` args
* Use `updateUser` to add unconfirmed email to user
* Confirm, then unconfirm emails, in order to test on unconfirmed emails
* Lowercase emails in `unconfirmSecondaryEmail`, so they get matched correctly
* Update UserEmailsTests.mjs with 6-digits flow, fetch, no `npm:async`
GitOrigin-RevId: 71b9ed65daebea5f22272240559caab375515f0c
* Rename `sendExistingSecondaryEmailConfirmationCode` to `sendExistingEmailConfirmationCode`
* Deduplicate error handling into `throwIfErrorResponse`
* Update `userHelper.confirmEmail` to use the 6-digits flow
GitOrigin-RevId: 91bdf7b185407b58520ca6b2aa1a7c71bdd23bc8
* [web] change status page URL to HTTPS everywhere
Also open all links to the status page or admin email in a new tab.
* [server-ce] explicit protocol matching
Co-authored-by: Brian Gough <brian.gough@overleaf.com>
---------
Co-authored-by: Brian Gough <brian.gough@overleaf.com>
GitOrigin-RevId: d7d12eef4efc737c5d70fc969c862acae9faf14c
* Add script to remove emails with commas and replace them emails to support with encoded former emails
* Enhance RemoveEmailsWithCommasScriptTest to verify unchanged user data
GitOrigin-RevId: 6961995f2a143ac1c53bc2eeb183808a4be7dd02
* [misc] freeze time before any other unit test setup steps
Freezing it after other work (notably sandboxed-module imports) will
result in flaky tests.
* [web] update the projects lastUpdated timestamp when changing file-tree
GitOrigin-RevId: b82b2ff74dc31886f3c4bd300375117eead6e0cd
* Fix `fix_malformed_filetree`'s `fixName`
* Fix findUniqueName with missing names in siblings
* Add test showcasing another bug: shifted arrays in filetree folder
* Update `removeNulls` to use `_id`
* Update services/web/app/src/Features/Project/ProjectLocator.js
Co-authored-by: Jakob Ackermann <jakob.ackermann@overleaf.com>
* Add FIXME about file names uniqueness
* Rename `obj` to `project`
---------
Co-authored-by: Jakob Ackermann <jakob.ackermann@overleaf.com>
GitOrigin-RevId: 3ed795ae0621800603395f7b50626ac89c39199d
* Create script: remove_unconfirmed_emails.mjs
* Update script remove_unconfirmed_emails.mjs after pairing
Co-authored-by: Rebeka <rebeka.dekany@overleaf.com>
* Add user counts. Add timing
* Revert previous changes: just remove the fully unconfirmed emails
* Add tests on scripts/remove_unconfirmed_emails.mjs
* Update audit log so `removedEmail` is a string and doesn't break the admin-panel audit logs list
* Update remove_unconfirmed_emails to have a `--generate` and a `--consume` mode
* Update tests on remove_unconfirmed_emails
* Add tests checking that `--consume` doesn't delete any email
* Update script so `--consume` checks that emails shouldn't be deleted again!
* Update CSV path to `/tmp/...`
* Add test cases: deleted users, deleted email, comma in email
---------
Co-authored-by: Rebeka <rebeka.dekany@overleaf.com>
GitOrigin-RevId: 8c60b56bcdfa33bc6143d66c32a5f430fb76f6d7
* [web] tests: rename User.upgradeFeatures to User.upgradeSomeFeatures
The upgrades features do not match with any plan.
* [web] make user feature changes in tests more reliable
* [web] fix schema for featuresOverride in tests
* [web] log in after upgrading features
GitOrigin-RevId: ac5b19c798712926c118b221c553540b413802cd
* [web] avoid setting up users more than once in tests
* [web] tests: simplify user exists check in User.setExtraAttributes
GitOrigin-RevId: 4c526df7c933a38ab93d7760efbd0a9490d5582a
* [misc] silence logger when running tests
* [misc] re-enable logging in some tests for scripts
* [misc] make it easy to turn on verbose logging for tests
```
LOG_LEVEL=debug make test_unit
LOG_LEVEL=debug make test_acceptance
```
GitOrigin-RevId: 219bc6d1f9cbdb89ddd7d94742920913ddde4514
* Create tests on find_malformed_filetrees and fix_malformed_filetrees
* Remove lines that are making fix_malformed_filetree fail
These lines are causing errors such as
```
Missing file hash: 586846800000000000000000/5891271c0000000000000000 (rootFolder.0.folders.2.fileRefs.7.hash)
SaaS: likely needs filestore restore
Server Pro: please reach out to support
```
* Add snapshots of projects after fix_malformed_filetree
* Set `WRITE_SNAPSHOT` as false
* Make `deleteProjectsRecordId0` constant
* Ignore duplicated ID errors in CreateMalformedFileTrees.mjs
* Move snapshots to directory folder
* Remove unnecessary code
* Update tests to cover use cases from the scripts
* Fix: Use `new ObjectId(projectId)` instead of the string in mongo queries
* Fix: Query `rootFolder: []` to fix more than `rootFolder: { $size: 0 }`
* Remove/rename files from first draft
* Remove empty strings from expects in unrelated tests, now that `filterOutput` removes them
* Add missing `expectFixStdout` to tests
* misc: rename test util to strId
* Add "well formed filetrees" to test cases
* Use `wellFormed` variable to remove some duplication
* Update tests:
- check Missing file hash path
- remove test on string/numbers as array items
* Add test "bug: shifted arrays in filetree"
* Rename `wellFormedFile` to `wellFormedFolder`
* Fix name of the root folder to `'rootFolder'`, not `'untitled'`
GitOrigin-RevId: dc098bb7ad3ca441fe2bb72b5f5f0e3bcedbdf67