jojo/templates/user/settings
0ko 1ef5496055 feat: use AppDomain for key verification (#10429)
Fixes #10416
Followup to a hardcoded string in [gitea#17743](https://github.com/go-gitea/gitea/pull/17743)

* instead of using a hardcoded namespace, use the configured application domain
    * `ssh-keygen` refuses to work with empty namespace, but `Domain` falls back to `localhost`:
    95dca7ff57/modules/setting/server.go (L192)
    * since `VerifySSHKey` verifies the namespace, I think that using a mostly-unique string instead of a hardcoded one doesn't hurt. Here's what `man ssh-keygen` says on the topic:
      > An additional signature namespace, used to prevent signature confusion across different domains of use (e.g. file signing vs email signing) must be provided  via  the  -n  flag.   Namespaces  are  arbitrary strings,  and  may  include:  “file”  for file signing, “email” for email signing.  For custom uses, it is recommended to use
names following a NAMESPACE@YOUR.DOMAIN pattern to generate unambiguous namespaces.

## Testing

There's a test `TestFromOpenSSH` but it uses a hardcoded default namespace `file`:
95dca7ff57/models/asymkey/ssh_key_test.go (L334)

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/10429
Reviewed-by: Beowulf <beowulf@beocode.eu>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: 0ko <0ko@noreply.codeberg.org>
Co-committed-by: 0ko <0ko@noreply.codeberg.org>
2025-12-17 17:01:14 +01:00
..
security feat: replace cross origin protection (#9830) 2025-10-29 22:43:22 +01:00
account.tmpl feat: replace cross origin protection (#9830) 2025-10-29 22:43:22 +01:00
actions.tmpl Support configuration variables on Gitea Actions (#24724) 2023-06-20 22:54:15 +00:00
appearance.tmpl feat: replace cross origin protection (#9830) 2025-10-29 22:43:22 +01:00
applications.tmpl feat: replace cross origin protection (#9830) 2025-10-29 22:43:22 +01:00
applications_oauth2.tmpl Always use ctx.Locale.Tr inside templates (#27231) 2023-09-25 08:56:50 +00:00
applications_oauth2_edit.tmpl Change to vertical navbar layout for secondary navbar for repo/user/admin settings (#24246) 2023-04-23 18:21:21 +08:00
applications_oauth2_edit_form.tmpl feat: replace cross origin protection (#9830) 2025-10-29 22:43:22 +01:00
applications_oauth2_list.tmpl feat: replace cross origin protection (#9830) 2025-10-29 22:43:22 +01:00
blocked_users.tmpl [MODERATION] User blocking 2024-02-05 15:56:45 +01:00
grants_oauth2.tmpl [PORT] Refactor DateUtils and merge TimeSince (gitea#32409) 2024-11-10 22:23:27 +01:00
hook_new.tmpl Always use ctx.Locale.Tr inside templates (#27231) 2023-09-25 08:56:50 +00:00
hooks.tmpl Change to vertical navbar layout for secondary navbar for repo/user/admin settings (#24246) 2023-04-23 18:21:21 +08:00
keys.tmpl Allow options to disable user ssh keys configuration from the interface on app.ini (#29447) 2024-03-11 23:36:57 +07:00
keys_gpg.tmpl fix(ui): document token validity in key verification view (#9002) 2025-11-14 23:40:03 +01:00
keys_principal.tmpl feat: replace cross origin protection (#9830) 2025-10-29 22:43:22 +01:00
keys_ssh.tmpl feat: use AppDomain for key verification (#10429) 2025-12-17 17:01:14 +01:00
layout_footer.tmpl Change to vertical navbar layout for secondary navbar for repo/user/admin settings (#24246) 2023-04-23 18:21:21 +08:00
layout_head.tmpl Reduce margins on user settings page, introduce flex-container (#26046) 2023-07-31 07:16:03 +00:00
navbar.tmpl feat: Global 2FA enforcement (#8753) 2025-08-15 10:56:45 +02:00
organization.tmpl feat: replace cross origin protection (#9830) 2025-10-29 22:43:22 +01:00
packages.tmpl feat: replace cross origin protection (#9830) 2025-10-29 22:43:22 +01:00
packages_cleanup_rules_edit.tmpl Change to vertical navbar layout for secondary navbar for repo/user/admin settings (#24246) 2023-04-23 18:21:21 +08:00
packages_cleanup_rules_preview.tmpl Change to vertical navbar layout for secondary navbar for repo/user/admin settings (#24246) 2023-04-23 18:21:21 +08:00
profile.tmpl feat: replace cross origin protection (#9830) 2025-10-29 22:43:22 +01:00
repos.tmpl feat: replace cross origin protection (#9830) 2025-10-29 22:43:22 +01:00
runner_edit.tmpl Add user level action runners (#24995) 2023-05-31 09:39:54 +08:00
storage_overview.tmpl feat(ui): add quota overview (#6602) 2025-02-26 14:36:53 +00:00