Adding SSH key doesn't work if JavaScript is disabled #5836

Closed
opened 2025-11-02 06:37:37 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @JeremyRand on GitHub (Aug 6, 2020).

  • Gitea version (or commit ref): 1.12.2 built with Go 1.14.4 (as packaged in Void)
  • Git version: 2.28.0 (as packaged in Void)
  • Operating system: Void Linux for PowerPC/Power ISA (ppc64le musl)
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
  • Log gist: Issue is client-side; no errors appears in browser console logs, client does not issue any network traffic to server.

Description

Instructions to reproduce

  1. Put Tor Browser in "Safest" security mode. Among other things this disables JavaScript.
  2. Log into Gitea.
  3. Visit the user/settings/keys path.
  4. Click Add Key to add an SSH key.

Expected results

Gitea should prompt me for an SSH key.

Observed results

Clicking the Add Key button has no effect.

Other notes

Putting Tor Browser into "Safer" security mode, which enables JavaScript, results in the Add Key button working as intended. This also affects GPG keys; not sure if I should open a separate bug for that.

Screenshots

Gitea-Add-SSH-Key-Broken-with-JS-Disabled

Originally created by @JeremyRand on GitHub (Aug 6, 2020). <!-- NOTE: If your issue is a security concern, please send an email to security@gitea.io instead of opening a public issue --> <!-- 1. Please speak English, this is the language all maintainers can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/gitea) or forum (https://discourse.gitea.io). 3. Please take a moment to check that your issue doesn't already exist. 4. Please give all relevant information below for bug reports, because incomplete details will be handled as an invalid report. --> - Gitea version (or commit ref): 1.12.2 built with Go 1.14.4 (as packaged in Void) - Git version: 2.28.0 (as packaged in Void) - Operating system: Void Linux for PowerPC/Power ISA (ppc64le musl) - Database (use `[x]`): - [ ] PostgreSQL - [ ] MySQL - [ ] MSSQL - [x] SQLite - Can you reproduce the bug at https://try.gitea.io: - [x] Yes (provide example URL): https://try.gitea.io/user/settings/keys - [ ] No - [ ] Not relevant - Log gist: Issue is client-side; no errors appears in browser console logs, client does not issue any network traffic to server. ## Description ### Instructions to reproduce 1. Put Tor Browser in "Safest" security mode. Among other things this disables JavaScript. 2. Log into Gitea. 3. Visit the `user/settings/keys` path. 4. Click `Add Key` to add an SSH key. ### Expected results Gitea should prompt me for an SSH key. ### Observed results Clicking the `Add Key` button has no effect. ### Other notes Putting Tor Browser into "Safer" security mode, which enables JavaScript, results in the `Add Key` button working as intended. This also affects GPG keys; not sure if I should open a separate bug for that. ## Screenshots <!-- **If this issue involves the Web Interface, please include a screenshot** --> ![Gitea-Add-SSH-Key-Broken-with-JS-Disabled](https://user-images.githubusercontent.com/244188/89553907-aa2d1380-d7fd-11ea-8efe-c8e1a96bb96c.png)
Author
Owner

@zeripath commented on GitHub (Aug 6, 2020):

Gitea requires JS to function. There are multiple parts of the site that will not function without JS.

@zeripath commented on GitHub (Aug 6, 2020): Gitea requires JS to function. There are multiple parts of the site that will not function without JS.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#5836