php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #69715 Parser silently accepts invalid text
Submitted: 2015-05-27 21:34 UTC Modified: 2015-05-27 21:52 UTC
From: hhurford at llamazone dot com Assigned:
Status: Not a bug Package: Unknown/Other Function
PHP Version: Irrelevant OS: FreeBSD
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: hhurford at llamazone dot com
New email:
PHP Version: OS:

 

 [2015-05-27 21:34 UTC] hhurford at llamazone dot com
Description:
------------
Place a url in a section of PHP code.
PHP accepts it
PHP gives neither an error nor a 500 response.

I intended to comment out the URL, but forgot.
PHP should have complained, but did not.

Test script:
---------------
<?php
ini_set('display_errors','On');
// On the next line, any URL can be used.
http://encosia.com/5-steps-toward-jquery-mastery/
?>

Expected result:
----------------
I expect a 500 fault.
The URL contains "//", which comments out most of the URL.
What is left is "http:" .
The parser is accepting "http:" without balking.




Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-05-27 21:52 UTC] requinix@php.net
-Status: Open +Status: Not a bug
 [2015-05-27 21:52 UTC] requinix@php.net
"http:" is valid. It's a label. http://php.net/goto
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 20:01:45 2024 UTC