Skip to content

fix(auth): require recent verification for sensitive actions - #23211

Open
nijel wants to merge 1 commit into
mainfrom
reverify
Open

nijel wants to merge 1 commit into
mainfrom
reverify

Conversation

@nijel

@nijel nijel commented Nov 29, 2026

Copy link
Copy Markdown
Member

Require fresh browser credentials before exposing secrets, downloading backups, or changing access and integration settings. Recheck permissions when resuming supported forms and preserve token-authenticated API workflows.

Fixes #23121
Fixes https://hackerone.com/reports/4245612

@nijel nijel added this to the 2026.12 milestone Nov 29, 2026
@nijel nijel self-assigned this Nov 29, 2026

@accesslint accesslint Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found 3 issues across 1 rule.

Repeated issues:

  • weblate/templates/manage/backup-credentials.html <li> is not contained in a <ul>, <ol>, or <menu>. (lines 6, 12)

Reviewed by AccessLint, which checks every pull request for accessibility issues.

{% load i18n %}

{% block breadcrumbs %}
<li class="breadcrumb-item">

@accesslint accesslint Bot Nov 29, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WCAG 1.3.1: <li> is not contained in a <ul>, <ol>, or <menu>.

<li> elements must be contained in a <ul>, <ol>, or <menu>.

Details

List items (<li>) only have semantic meaning inside a list container (<ul>, <ol>, or <menu>). Without a list parent, screen readers will not announce 'list with N items' or allow users to skip between items using list navigation shortcuts. Wrap <li> elements in the appropriate list container — <ul> for unordered lists, <ol> for ordered/numbered lists.

Also on line 12.

<li class="breadcrumb-item">
<a href="{% url 'manage-backups' %}">{% translate "Backups" %}</a>
</li>
<li class="breadcrumb-item active" aria-current="page">{% translate "Backup service credentials" %}</li>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WCAG 1.3.1: <li> is not contained in a <ul>, <ol>, or <menu>.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-29T20:49:51.757900Z 89d42d5 New commits
🔒 Security Review ✅ Completed 2026-11-29T17:05:34.993340Z 88a0d16 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 34 files

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

Comment thread weblate/api/views.py Resolved
Comment thread weblate/billing/views.py Resolved
Comment thread weblate/trans/admin.py Resolved
Comment thread weblate/addons/base.py Resolved
Comment thread weblate/auth/tests/test_admin.py Resolved
Comment thread weblate/addons/views.py Resolved
Comment thread weblate/addons/views.py Resolved
Comment thread docs/changes.rst Resolved
@codecov

codecov Bot commented Nov 29, 2026 •

Copy link
Copy Markdown

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
15889 1 15888 913
View the top 1 failed test(s) by shortest run time
weblate.api.tests.CategoryAPITest::test_update_keeps_category_in_its_existing_project
Stack Traces | 0.144s run time
self = <weblate.api.tests.CategoryAPITest testMethod=test_update_keeps_category_in_its_existing_project>

    def test_update_keeps_category_in_its_existing_project(self) -> None:
        category = Category.objects.create(
            name="Move category", slug="move-category", project=self.project
        )
        destination = Project.objects.create(name="Destination", slug="destination")
        url = reverse("api:category-detail", args=[category.pk])
        data = {"project": reverse("api:project-detail", args=[destination.slug])}
        self.authenticate(superuser=True)
        response = self.client.patch(url, data, format="json")
        self.assertEqual(response.status_code, 200)
        category.refresh_from_db()
>       self.assertEqual(category.project_id, self.project.pk)
E       AssertionError: 34 != 30

weblate/api/tests.py:25056: AssertionError

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@accesslint accesslint Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found 3 issues across 1 rule.

Repeated issues:

  • weblate/templates/manage/backup-credentials.html <li> is not contained in a <ul>, <ol>, or <menu>. (lines 6, 12)

Reviewed by AccessLint, which checks every pull request for accessibility issues.

{% load i18n %}

{% block breadcrumbs %}
<li class="breadcrumb-item">

@accesslint accesslint Bot Nov 29, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WCAG 1.3.1: <li> is not contained in a <ul>, <ol>, or <menu>.

<li> elements must be contained in a <ul>, <ol>, or <menu>.

Details

List items (<li>) only have semantic meaning inside a list container (<ul>, <ol>, or <menu>). Without a list parent, screen readers will not announce 'list with N items' or allow users to skip between items using list navigation shortcuts. Wrap <li> elements in the appropriate list container — <ul> for unordered lists, <ol> for ordered/numbered lists.

Also on line 12.

<li class="breadcrumb-item">
<a href="{% url 'manage-backups' %}">{% translate "Backups" %}</a>
</li>
<li class="breadcrumb-item active" aria-current="page">{% translate "Backup service credentials" %}</li>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WCAG 1.3.1: <li> is not contained in a <ul>, <ol>, or <menu>.

@accesslint accesslint Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found 3 issues across 1 rule.

Repeated issues:

  • weblate/templates/manage/backup-credentials.html <li> is not contained in a <ul>, <ol>, or <menu>. (lines 6, 12)

Reviewed by AccessLint, which checks every pull request for accessibility issues.

{% load i18n %}

{% block breadcrumbs %}
<li class="breadcrumb-item">

@accesslint accesslint Bot Nov 29, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WCAG 1.3.1: <li> is not contained in a <ul>, <ol>, or <menu>.

<li> elements must be contained in a <ul>, <ol>, or <menu>.

Details

List items (<li>) only have semantic meaning inside a list container (<ul>, <ol>, or <menu>). Without a list parent, screen readers will not announce 'list with N items' or allow users to skip between items using list navigation shortcuts. Wrap <li> elements in the appropriate list container — <ul> for unordered lists, <ol> for ordered/numbered lists.

Also on line 12.

<li class="breadcrumb-item">
<a href="{% url 'manage-backups' %}">{% translate "Backups" %}</a>
</li>
<li class="breadcrumb-item active" aria-current="page">{% translate "Backup service credentials" %}</li>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WCAG 1.3.1: <li> is not contained in a <ul>, <ol>, or <menu>.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 4 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="weblate/accounts/tests/test_confidential_collaboration.py">

<violation number="1" location="weblate/accounts/tests/test_confidential_collaboration.py:359">
P2: The added verification step means this test now only exercises the fresh-verification state for the administrator. Add a case that asserts the sensitive routes (e.g. `manage-access`, `addons`, `workspace-access`) redirect or deny an administrator before the verify POST, so the gating itself is covered.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

]
for viewer in (self.translators[0], self.administrator):
self.client.force_login(viewer)
if viewer == self.administrator:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: The added verification step means this test now only exercises the fresh-verification state for the administrator. Add a case that asserts the sensitive routes (e.g. manage-access, addons, workspace-access) redirect or deny an administrator before the verify POST, so the gating itself is covered.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At weblate/accounts/tests/test_confidential_collaboration.py, line 359:

<comment>The added verification step means this test now only exercises the fresh-verification state for the administrator. Add a case that asserts the sensitive routes (e.g. `manage-access`, `addons`, `workspace-access`) redirect or deny an administrator before the verify POST, so the gating itself is covered.</comment>

<file context>
@@ -356,6 +356,14 @@ class ConfidentialCollaborationTest(FixtureTestCase):
         ]
         for viewer in (self.translators[0], self.administrator):
             self.client.force_login(viewer)
+            if viewer == self.administrator:
+                response = self.client.post(
+                    reverse("first-factor-verify"),
</file context>

Require fresh browser credentials before exposing secrets, downloading backups, or changing access and integration settings. Recheck permissions when resuming supported forms and preserve token-authenticated API workflows.

Fixes #23121
Fixes https://hackerone.com/reports/4245612

@accesslint accesslint Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found 3 issues across 1 rule.

Repeated issues:

  • weblate/templates/manage/backup-credentials.html <li> is not contained in a <ul>, <ol>, or <menu>. (lines 6, 12)

Reviewed by AccessLint, which checks every pull request for accessibility issues.

{% load i18n %}

{% block breadcrumbs %}
<li class="breadcrumb-item">

@accesslint accesslint Bot Nov 29, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WCAG 1.3.1: <li> is not contained in a <ul>, <ol>, or <menu>.

<li> elements must be contained in a <ul>, <ol>, or <menu>.

Details

List items (<li>) only have semantic meaning inside a list container (<ul>, <ol>, or <menu>). Without a list parent, screen readers will not announce 'list with N items' or allow users to skip between items using list navigation shortcuts. Wrap <li> elements in the appropriate list container — <ul> for unordered lists, <ol> for ordered/numbered lists.

Also on line 12.

<li class="breadcrumb-item">
<a href="{% url 'manage-backups' %}">{% translate "Backups" %}</a>
</li>
<li class="breadcrumb-item active" aria-current="page">{% translate "Backup service credentials" %}</li>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WCAG 1.3.1: <li> is not contained in a <ul>, <ol>, or <menu>.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Site SSH private key download has no recent-authentication (sensitive verification) requirement

1 participant