Bug #80277 [NEW]: parse_url & parse_str problems with values with percentage

From: Date: Fri, 23 Oct 2020 14:37:07 +0000
Subject: Bug #80277 [NEW]: parse_url & parse_str problems with values with percentage
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-229880@lists.php.net to get a copy of this message
From:             nnikolay at gmail dot com
Operating system: Debian 10
PHP version:      7.4.11
Package:          *General Issues
Bug Type:         Bug
Bug description:parse_url & parse_str problems with values with percentage

Description:
------------
parse_url & parse_str have problems, when in the URL is some value with
percent in the form:

domain.com/?campaignid=%campaignid%&adid=%bannerid%

Then both of them are converting the "%" in some unicode, which breaks
the code:

array(4) {
  ["scheme"]=>
  string(5) "https"
  ["host"]=>
  string(19) "domain"
  ["path"]=>
  string(16) "/path/"
  ["query"]=>
  array(6) {
    ["campaignid"]=>
    string(10) "�mpaignid%"
    ["adid"]=>
    string(8) "�nnerid%"
  }
} 


-- 
Edit bug report at https://bugs.php.net/bug.php?id=80277&edit=1
-- 
Fix committed:                    https://bugs.php.net/fix.php?id=80277&r=fixed
Fixed in release:                 https://bugs.php.net/fix.php?id=80277&r=alreadyfixed
Need backtrace:                   https://bugs.php.net/fix.php?id=80277&r=needtrace
Need Reproduce Script:            https://bugs.php.net/fix.php?id=80277&r=needscript
Try newer version:                https://bugs.php.net/fix.php?id=80277&r=oldversion
Not developer issue:              https://bugs.php.net/fix.php?id=80277&r=support
Expected behavior:                https://bugs.php.net/fix.php?id=80277&r=notwrong
Not enough info:                  https://bugs.php.net/fix.php?id=80277&r=notenoughinfo
Submitted twice:                  https://bugs.php.net/fix.php?id=80277&r=submittedtwice
register_globals:                 https://bugs.php.net/fix.php?id=80277&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=80277&r=phptooold
Daylight Savings:                 https://bugs.php.net/fix.php?id=80277&r=dst
IIS Stability:                    https://bugs.php.net/fix.php?id=80277&r=isapi
Install GNU Sed:                  https://bugs.php.net/fix.php?id=80277&r=gnused
Floating point limitations:       https://bugs.php.net/fix.php?id=80277&r=float
No Zend Extensions:               https://bugs.php.net/fix.php?id=80277&r=nozend
MySQL Configuration Error:        https://bugs.php.net/fix.php?id=80277&r=mysqlcfg


Thread (13 messages)

« previous php.bugs (#229880) next »