Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

invalid characters in path (route) lead to jackrabbit xml parser error #145

Closed
levuro opened this issue Sep 9, 2015 · 4 comments
Closed

Comments

@levuro
Copy link

levuro commented Sep 9, 2015

requesting a cmf url of the form http://joiz.lo/main_dev.php/[[dsfdsfsdfsd]] leads to the error message

Warning: DOMDocument::loadXML(): AttValue: " or ' expected in Entity, line: 1
500 Internal Server Error - ContextErrorException

Stack Trace
in /var/www/joiz.lo/vendor/jackalope/jackalope-jackrabbit/src/Jackalope/Transport/Jackrabbit/Request.php at line 685 -
// create new DOMDocument and load the response text.
$dom = new DOMDocument();
$dom->loadXML($xml);
return $dom;

ok - you can blame the angular developers and make them fix their code - but i think it would be also a good idea to add some logic which regcognises a path which will most likely produce a error in jackrabbit route lookup and return straight a 404 instread of bothering the jackrabbit first

@lsmith77
Copy link
Member

lsmith77 commented Sep 9, 2015

I think we should check if we have a valid path before even calling the PHPCR layer

@dbu
Copy link
Member

dbu commented Jan 9, 2016

this is fixed in newer versions of phpcr-odm. i debugged the situtation with the current https://github.com/symfony-cmf/cmf-sandbox and was not able to reproduce the issue. the RoutingBundle\Doctrine\Phpcr\RouteProvider::getRouteCollectionForRequest sees /cms/routes/[[dsfdsfdfsd]] as a candidate, but after $routes = $dm->findMany($this->className, $candidates);, the $routes only contain /cms/routes and /cms/simple. this leads to a regular 404 which is the expected behaviour.

@dbu dbu closed this as completed Jan 9, 2016
@levuro
Copy link
Author

levuro commented Jan 12, 2016

Can i use the phpcr-odm 1.3 with CMF 1.2 ?

@dbu
Copy link
Member

dbu commented Jan 13, 2016 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants