mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 15:52:07 +00:00
Ignore decimal point when deciding if meta refresh contains garbage. r=radha@netscape.com sr=alecf@netscape.com a=asa@mozilla.org
This commit is contained in:
parent
7432a9312b
commit
96cd687fd7
@ -3854,11 +3854,13 @@ nsDocShell::SetupRefreshURIFromHeader(nsIURI * aBaseURI,
|
|||||||
if (specifiesSeconds)
|
if (specifiesSeconds)
|
||||||
{
|
{
|
||||||
// Non-whitespace characters here mean that the string is
|
// Non-whitespace characters here mean that the string is
|
||||||
// malformed.
|
// malformed but tolerate sites that specify a decimal point,
|
||||||
if (iter == iterAfterDigit && !nsCRT::IsAsciiSpace(*iter))
|
// even though meta refresh only works on whole seconds.
|
||||||
|
if (iter == iterAfterDigit &&
|
||||||
|
!nsCRT::IsAsciiSpace(*iter) && *iter != '.')
|
||||||
{
|
{
|
||||||
// There is no space between the seconds and this character
|
// The characters between the seconds and the next
|
||||||
// so the seconds are garbage!
|
// section are just garbage!
|
||||||
// e.g. content="2a0z+,URL=http://www.mozilla.org/"
|
// e.g. content="2a0z+,URL=http://www.mozilla.org/"
|
||||||
// Just ignore this redirect.
|
// Just ignore this redirect.
|
||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
|
Loading…
Reference in New Issue
Block a user