GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [3.11] gh-160506: Fix ntpath.realpath() for broken links via directory links (GH-160507) by miss-islington · Pull Request #161030 · python/cpython

Conversation

@miss-islington

@miss-islington miss-islington commented Oct 31, 2026 •
edited by bedevere-app Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Resolve the directory containing a broken relative symlink before
joining the link target to it, so that '..' in the target is applied
to the real directory.

ANT-2026-27II3A20
(cherry picked from commit 65665a4)

Co-authored-by: Gregory P. Smith [email protected]

  • Issue: os.path.realpath() on Windows misresolves a broken symlink reached through a directory symlink #160506

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@gpshead @miss-islington
pythongh-160506: Fix ntpath.realpath() for broken links via directory…
bcb431c
… links (pythonGH-160507)

Resolve the directory containing a broken relative symlink before
joining the link target to it, so that '..' in the target is applied
to the real directory.

ANT-2026-27II3A20
(cherry picked from commit 65665a4)

Co-authored-by: Gregory P. Smith <[email protected]>
@miss-islington
miss-islington requested a review from ethanfurman as a code owner October 31, 2026 19:09
@bedevere-app bedevere-app Bot added the awaiting review label Oct 31, 2026
This was referenced Oct 31, 2026
os.path.realpath() on Windows misresolves a broken symlink reached through a directory symlink #160506
Closed
gh-160506: Fix ntpath.realpath() for broken links via directory links #160507
Merged
@bedevere-app bedevere-app Bot added sprint type-security A security issue labels Oct 31, 2026
@github-project-automation github-project-automation Bot added this to Sprint Oct 31, 2026
@github-project-automation github-project-automation Bot moved this to Todo in Sprint Oct 31, 2026
@gpshead gpshead added the release-blocker label Oct 31, 2026
@github-project-automation github-project-automation Bot added this to Release and Deferred blockers 🚫 Oct 31, 2026
@github-project-automation github-project-automation Bot moved this to Todo in Release and Deferred blockers 🚫 Oct 31, 2026
@gpshead
Drop ALL_BUT_LAST from the backported test; it does not exist in 3.11
3691085
@gpshead gpshead closed this Nov 9, 2026
@gpshead gpshead reopened this Nov 9, 2026
@github-project-automation github-project-automation Bot moved this from Todo to Done in Release and Deferred blockers 🚫 Nov 9, 2026
@github-project-automation github-project-automation Bot moved this from Todo to Done in Sprint Nov 9, 2026
@github-project-automation github-project-automation Bot moved this from Done to In Progress in Release and Deferred blockers 🚫 Nov 9, 2026
@github-project-automation github-project-automation Bot moved this from Done to In Progress in Sprint Nov 9, 2026
gpshead added 2 commits November 9, 2026 02:16
@gpshead
Expect an OSError from test_parent_symlink3 fully_trusted on Windows
b4f2766
Before 3.15, tarfile keeps the '/' in symlink targets on Windows
(pythongh-57911), so writing through the '../evil' link fails, as already
handled in test_parent_symlink2.
@gpshead
Skip test_parent_symlink3 on Windows
3d03089
Before 3.15, tarfile keeps the '/' in symlink targets on Windows
(pythongh-57911), so the links it creates cannot be followed and realpath()
fails on them.  test_ntpath covers the fix on Windows.
@gpshead gpshead assigned pablogsal Nov 9, 2026
@hugovk hugovk mentioned this pull request Nov 9, 2026
[3.11] gh-128504: Pin the doctest workflow to Ubuntu 24.04 #161664
Merged
@hugovk
Merge branch '3.11' into backport-65665a4-3.11
9971cb3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@ethanfurman ethanfurman Awaiting requested review from ethanfurman ethanfurman is a code owner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@pablogsal pablogsal

Labels

awaiting review release-blocker sprint type-security A security issue

Projects

Release and Deferred blockers 🚫
Status: In Progress
Sprint
Status: In Progress

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@miss-islington @gpshead @pablogsal @hugovk
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.