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
37484dc3
Kaydet (Commit)
37484dc3
authored
May 24, 2012
tarafından
Senthil Kumaran
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #14036: return None when port in urlparse cross 65535
üst
cd8799f0
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
2 deletions
+12
-2
test_urlparse.py
Lib/test/test_urlparse.py
+5
-0
urlparse.py
Lib/urlparse.py
+4
-2
NEWS
Misc/NEWS
+3
-0
No files found.
Lib/test/test_urlparse.py
Dosyayı görüntüle @
37484dc3
...
@@ -437,6 +437,11 @@ class UrlParseTestCase(unittest.TestCase):
...
@@ -437,6 +437,11 @@ class UrlParseTestCase(unittest.TestCase):
self
.
assertEqual
(
p
.
port
,
80
)
self
.
assertEqual
(
p
.
port
,
80
)
self
.
assertEqual
(
p
.
geturl
(),
url
)
self
.
assertEqual
(
p
.
geturl
(),
url
)
# Verify an illegal port of value greater than 65535 is set as None
url
=
"http://www.python.org:65536"
p
=
urlparse
.
urlsplit
(
url
)
self
.
assertEqual
(
p
.
port
,
None
)
def
test_issue14072
(
self
):
def
test_issue14072
(
self
):
p1
=
urlparse
.
urlsplit
(
'tel:+31-641044153'
)
p1
=
urlparse
.
urlsplit
(
'tel:+31-641044153'
)
self
.
assertEqual
(
p1
.
scheme
,
'tel'
)
self
.
assertEqual
(
p1
.
scheme
,
'tel'
)
...
...
Lib/urlparse.py
Dosyayı görüntüle @
37484dc3
...
@@ -97,8 +97,10 @@ class ResultMixin(object):
...
@@ -97,8 +97,10 @@ class ResultMixin(object):
netloc
=
self
.
netloc
.
split
(
'@'
)[
-
1
]
.
split
(
']'
)[
-
1
]
netloc
=
self
.
netloc
.
split
(
'@'
)[
-
1
]
.
split
(
']'
)[
-
1
]
if
':'
in
netloc
:
if
':'
in
netloc
:
port
=
netloc
.
split
(
':'
)[
1
]
port
=
netloc
.
split
(
':'
)[
1
]
return
int
(
port
,
10
)
port
=
int
(
port
,
10
)
else
:
# verify legal port
if
(
0
<=
port
<=
65535
):
return
port
return
None
return
None
from
collections
import
namedtuple
from
collections
import
namedtuple
...
...
Misc/NEWS
Dosyayı görüntüle @
37484dc3
...
@@ -64,6 +64,9 @@ Core and Builtins
...
@@ -64,6 +64,9 @@ Core and Builtins
Library
Library
-------
-------
-
Issue
#
14036
:
Add
an
additional
check
to
validate
that
port
in
urlparse
does
not
go
in
illegal
range
and
returns
None
.
-
Issue
#
14888
:
Fix
misbehaviour
of
the
_md5
module
when
called
on
data
-
Issue
#
14888
:
Fix
misbehaviour
of
the
_md5
module
when
called
on
data
larger
than
2
**
32
bytes
.
larger
than
2
**
32
bytes
.
...
...
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