Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
a8c75fe3
Kaydet (Commit)
a8c75fe3
authored
Haz 15, 2014
tarafından
Benjamin Peterson
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
merge 3.3 (#21766)
üst
02200480
6cd1954c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
1 deletion
+9
-1
server.py
Lib/http/server.py
+1
-1
test_httpservers.py
Lib/test/test_httpservers.py
+5
-0
NEWS
Misc/NEWS
+3
-0
No files found.
Lib/http/server.py
Dosyayı görüntüle @
a8c75fe3
...
...
@@ -977,7 +977,7 @@ class CGIHTTPRequestHandler(SimpleHTTPRequestHandler):
(and the next character is a '/' or the end of the string).
"""
collapsed_path
=
_url_collapse_path
(
self
.
path
)
collapsed_path
=
_url_collapse_path
(
urllib
.
parse
.
unquote
(
self
.
path
)
)
dir_sep
=
collapsed_path
.
find
(
'/'
,
1
)
head
,
tail
=
collapsed_path
[:
dir_sep
],
collapsed_path
[
dir_sep
+
1
:]
if
head
in
self
.
cgi_directories
:
...
...
Lib/test/test_httpservers.py
Dosyayı görüntüle @
a8c75fe3
...
...
@@ -485,6 +485,11 @@ class CGIHTTPServerTestCase(BaseTestCase):
(
res
.
read
(),
res
.
getheader
(
'Content-type'
),
res
.
status
))
self
.
assertEqual
(
os
.
environ
[
'SERVER_SOFTWARE'
],
signature
)
def
test_urlquote_decoding_in_cgi_check
(
self
):
res
=
self
.
request
(
'/cgi-bin
%2
ffile1.py'
)
self
.
assertEqual
((
b
'Hello World
\n
'
,
'text/html'
,
200
),
(
res
.
read
(),
res
.
getheader
(
'Content-type'
),
res
.
status
))
class
SocketlessRequestHandler
(
SimpleHTTPRequestHandler
):
def
__init__
(
self
):
...
...
Misc/NEWS
Dosyayı görüntüle @
a8c75fe3
...
...
@@ -26,6 +26,9 @@ Library
run_forever() and run_until_complete() methods of asyncio.BaseEventLoop now
raise an exception if the event loop was closed.
- Issue #21766: Prevent a security hole in CGIHTTPServer by URL unquoting paths
before checking for a CGI script at that path.
- Issue #21310: Fixed possible resource leak in failed open().
- Issue #21677: Fixed chaining nonnormalized exceptions in io close() methods.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment