Skip to content

fix(accounts): omit recovery tokens from logs - #23231

Open
nijel wants to merge 1 commit into
mainfrom
review/oss-batch2-m5releps
Open

nijel wants to merge 1 commit into
mainfrom
review/oss-batch2-m5releps

Conversation

@nijel

@nijel nijel commented Nov 30, 2026

Copy link
Copy Markdown
Member

Keep reset and activation URLs in the outgoing mail context while logging only the backend name. Do not include invitation UUIDs in invitation string rendering.

Discovered by Anthropic's OSS Scanner, as vulnerability ANT-2026-M5RELEPS.

Keep reset and activation URLs in the outgoing mail context while logging only the backend name. Do not include invitation UUIDs in invitation string rendering.

Discovered by Anthropic's OSS Scanner, as vulnerability ANT-2026-M5RELEPS.
@nijel nijel added this to the 2026.12 milestone Nov 30, 2026
@nijel nijel self-assigned this Nov 30, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 30, 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-30T06:45:06.842031Z a827d06 PR opened
🔒 Security Review ✅ Completed 2026-11-30T06:46:33.855250Z a827d06 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.

No issues found across 5 files

Turn on auto-fix | Re-trigger cubic

@codecov

codecov Bot commented Nov 30, 2026

Copy link
Copy Markdown

❌ 4 Tests Failed:

Tests completed Failed Passed Skipped
15750 4 15746 1053
View the top 3 failed test(s) by shortest run time
weblate.utils.tests.test_files.FilesTestCase::test_resolve_path_walks_missing_suffix_once
Stack Traces | 0.002s run time
self = <weblate.utils.tests.test_files.FilesTestCase testMethod=test_resolve_path_walks_missing_suffix_once>

    def test_resolve_path_walks_missing_suffix_once(self) -> None:
        with tempfile.TemporaryDirectory() as tempdir:
            path = os.path.join(tempdir, "missing", *("nested" for _ in range(200)))
            with patch("weblate.utils.files.os.lstat", wraps=os.lstat) as lstat:
>               self.assertEqual(resolve_path(path), Path(path))
E               AssertionError: PosixPath('.../folders/q2/p1t6rgxj5fj32g1dc7[1431 chars]ted') != PosixPath('.../folders/q2/p1t6rgxj5fj32g1dc7dmd49r00[1423 chars]ted')

.../utils/tests/test_files.py:453: AssertionError
weblate.utils.tests.test_files.FilesTestCase::test_is_path_within_directory_rejects_unresolvable_symlink
Stack Traces | 0.005s run time
self = <weblate.utils.tests.test_files.FilesTestCase testMethod=test_is_path_within_directory_rejects_unresolvable_symlink>

    def test_is_path_within_directory_rejects_unresolvable_symlink(self) -> None:
        with tempfile.TemporaryDirectory() as tempdir:
>           repo_path, filename = self.create_unresolvable_symlink(tempdir)
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.../utils/tests/test_files.py:415: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

tempdir = '.../p1t6rgxj5fj32g1dc7dmd49r0000gn/T/tmpth6p1uir'

    @staticmethod
    def create_unresolvable_symlink(tempdir: str) -> tuple[str, str]:
        """Create a symlink escaping the repository stored beyond PATH_MAX."""
        repo_path = os.path.join(tempdir, "repo")
        outside_path = os.path.join(tempdir, "outside")
        os.makedirs(repo_path)
        os.makedirs(outside_path)
        Path(outside_path, "secrets.po").write_text("test", encoding="utf-8")
        # Deep enough to exceed PATH_MAX regardless of the temporary directory
        parts = ["d" * 238] * 17
        fd = os.open(repo_path, os.O_RDONLY)
        try:
            for index, part in enumerate(parts):
                os.mkdir(part, dir_fd=fd)
                child = os.open(part, os.O_RDONLY, dir_fd=fd)
                os.close(fd)
                fd = child
                if index == 7:
                    # Keep each symlink target below filesystem length limits.
>                   os.symlink("/".join(parts[8:]), "next", dir_fd=fd)
E                   OSError: [Errno 63] File name too long: '.../dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd/dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd/dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd' -> 'next'

.../utils/tests/test_files.py:403: OSError
weblate.utils.tests.test_files.FilesTestCase::test_resolve_path
Stack Traces | 0.068s run time
self = <weblate.utils.tests.test_files.FilesTestCase testMethod=test_resolve_path>

    def test_resolve_path(self) -> None:
        for resolve in (resolve_path, _realpath_allow_missing):
            with (
                self.subTest(resolve=resolve.__name__),
                tempfile.TemporaryDirectory() as tempdir,
            ):
>               repo_path, filename = self.create_unresolvable_symlink(tempdir)
                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.../utils/tests/test_files.py:426: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

tempdir = '.../p1t6rgxj5fj32g1dc7dmd49r0000gn/T/tmp1yiguwn2'

    @staticmethod
    def create_unresolvable_symlink(tempdir: str) -> tuple[str, str]:
        """Create a symlink escaping the repository stored beyond PATH_MAX."""
        repo_path = os.path.join(tempdir, "repo")
        outside_path = os.path.join(tempdir, "outside")
        os.makedirs(repo_path)
        os.makedirs(outside_path)
        Path(outside_path, "secrets.po").write_text("test", encoding="utf-8")
        # Deep enough to exceed PATH_MAX regardless of the temporary directory
        parts = ["d" * 238] * 17
        fd = os.open(repo_path, os.O_RDONLY)
        try:
            for index, part in enumerate(parts):
                os.mkdir(part, dir_fd=fd)
                child = os.open(part, os.O_RDONLY, dir_fd=fd)
                os.close(fd)
                fd = child
                if index == 7:
                    # Keep each symlink target below filesystem length limits.
>                   os.symlink("/".join(parts[8:]), "next", dir_fd=fd)
E                   OSError: [Errno 63] File name too long: '.../dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd/dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd/dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd' -> 'next'

.../utils/tests/test_files.py:403: OSError
weblate.trans.tests.test_tasks.TasksTest::test_cleanup_stale_repos_component_wins_over_category_collision
Stack Traces | 0.19s run time
self = <weblate.trans.tests.test_tasks.TasksTest testMethod=test_cleanup_stale_repos_component_wins_over_category_collision>

    def test_cleanup_stale_repos_component_wins_over_category_collision(self) -> None:
>       Category.objects.create(
            project=self.project,
            name="Case collision",
            slug=self.component.slug.upper(),
        )

.../trans/tests/test_tasks.py:1452: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.venv/lib/python3.14.../db/models/manager.py:87: in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.venv/lib/python3.14.../db/models/query.py:669: in create
    obj.save(force_insert=True, using=self.db)
.../trans/models/category.py:385: in save
    self.validate_create_path()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <Category: Test/Case collision>

    def validate_create_path(self) -> None:
        path = self.full_path
        if os.path.exists(path) and (not os.path.isdir(path) or os.listdir(path)):
>           raise ValidationError(
                {
                    "slug": gettext(
                        "Repository path for this category already exists and is not empty."
                    )
                }
            )
E           django.core.exceptions.ValidationError: {'slug': ['Repository path for this category already exists and is not empty.']}

.../trans/models/category.py:520: ValidationError

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

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.

1 participant