forgejo/tests
0ko 5ac2c0a2ba fix(ui): multiple fixes of sync fork UI (#7740)
Followup to https://codeberg.org/forgejo/forgejo/pulls/2364
Replaces https://codeberg.org/forgejo/forgejo/pulls/7666

Fix multiple issues with the original implementation:
* `SyncFork` web handler used `{branch}` as a parameter, so it failed for branches with `/` in names
    * Originally I switched it to use `*` like other branch web handlers, but I found that it was easier to move it out from URL to POST request values
* Security: `SyncFork` web handler was using GET method, so just visiting the link was enough to execute the action
    * It was switched to POST done via form with CSRF, which also allowed to put branch name in it's values
* Security: in template, branch name was not escaped but rendered with `SafeHTML`, allowing for rendering fun characters like `&` and for script execution. Also the link was not escaped correctly and would be leading to 404
    * To avoid having to change all translations, only the branch name+link part was changed and is now escaped with `HTMLFormat` before being passed to TrN

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7740
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: 0ko <0ko@noreply.codeberg.org>
Co-committed-by: 0ko <0ko@noreply.codeberg.org>
2025-05-02 14:25:05 +00:00
..
e2e fix(ui): make pagination labels always visible to screenreader 2025-04-23 23:58:03 +02:00
fuzz chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
gitea-lfs-meta Test views of LFS files (#22196) 2022-12-23 07:41:56 +08:00
gitea-repositories-meta chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
integration fix(ui): multiple fixes of sync fork UI (#7740) 2025-05-02 14:25:05 +00:00
testdata/data Add artifacts test fixture (#30300) 2024-11-05 09:33:15 +01:00
mysql.ini.tmpl chore: improve slow tests 2024-11-14 12:41:11 +01:00
pgsql.ini.tmpl chore: improve slow tests 2024-11-14 12:41:11 +01:00
sqlite.ini.tmpl test: use memory for integration and journal for migration 2024-11-14 15:38:06 +01:00
test_utils.go chore: merge tests.AddFixtures and unittest.OverrideFixtures (#7648) 2025-04-25 09:14:33 +00:00