Closed mallorydxw closed 7 years ago
Note that whippet-sever
now depends on php-intl
and php-curl
(those are the package names in Ubuntu).
Can we avoid that dependency? It's a pain in the arse on OSX, requires a PECL package to be installed which itself depends on a library (ICU) that needs to be installed independently.
Assign the ticket back to me and I'll take a look at what other URI-manipulation libraries are available.
Updated the PR to use sabre/uri
instead of league/uri
.
Are there updated instructions for getting it working?
I pulled, ran composer install
, started a server and got:
Fatal error: Uncaught Error: Call to undefined function Uri\parse() in /Users/harry/Projects/tools/whippet-server/lib/whippet.class.php:247 Stack trace: #0 /Users/harry/Projects/tools/whippet-server/lib/router.php(10): Whippet->run() #1 {main} thrown in /Users/harry/Projects/tools/whippet-server/lib/whippet.class.php on line 247
on the page I visited.
The namespace is Sabre\Uri
but in this PR I've written \Uri
instead. How did that happen. I wonder if I was accidentally testing with an older commit?
Okay, this should be working now. I tested it.
I get a notice about requested_uri
now...
Notice: Undefined property: Whippet::$requested_uri in /Users/harry/Projects/tools/whippet-server/lib/whippet.class.php on line 264
This was previously allowing malicious requests like the following:
GET /../../../etc/passwd HTTP/1.1
.Resolves: https://dxw.zendesk.com/agent/tickets/5659