GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||
GeezerVison is showing github.com — bpo-43223: [SECURITY] Patched Open Redirection In SimpleHTTPServer Module by hamzaavvan · Pull Request #24848 · python/cpython Conversation
|
|
This PR is stale because it has been open for 30 days with no activity. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Sorry I was busy with my other projects. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
0fe6eed to
3717f3f
Compare
|
Since I'm new to writing test cases, please help me in correcting the code if something went wrong. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Fix an open redirection vulnerability in the HTTP server when a URL contains ``//``. Added test case for bpo-43223 patch
3717f3f to
42eb552
Compare
|
@vstinner please have a look at the unit test. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
|
||
| def test_http_parse_request(self): | ||
| self.assertEqual(re.sub(r'^/+', '/', '//test.com'), '/test.com', '//test.com should be converted to a proper relative path') | ||
| self.assertEqual(re.sub(r'^/+', '/', '///test.com'), '/test.com', '///test.com should be converted to a proper relative path') |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This doesn't test anything useful. It only checks that some regular expression matches two strings. Since your code change is in http.server, your test should execute the http.server path that you changed.
A good test should fail without your code change to http.server, and pass with your change.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Sorry I've been away due to my workload. But now as I've got some spare time I can do it better. As I've already said earlier that I'm new to writing these test cases and after checking out your comment I'm still confused about your requirements
Can you please elaborate these two statements:
Since your code change is in http.server, your test should execute the http.server path that you changed.
and this one:
A good test should fail without your code change to http.server, and pass with your change.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
@hamzaavvan, to put it in the simplest terms:
main branch, write a test that fails because it triggers the problem described in BPO-43223; this will prove we have a problem;The test will have to actually run the HTTP server to be useful.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@hamzaavvan ping :) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I've lost access to my account 😥 replying from email..
…On Fri, Apr 8, 2022, 6:26 PM Jakub Hadvig ***@***.***> wrote:
@hamzaavvan <https://github.com/hamzaavvan> ping :)
—
Reply to this email directly, view it on GitHub
<#24848 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACNY3RNMO7QIH6RKTIMDD53VEAXYXANCNFSM4ZEGXF4Q>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
This PR has been replaced by #93879 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.