Skip to content

Instantly share code, notes, and snippets.

@roddux
Created November 6, 2019 15:26
Show Gist options
  • Save roddux/cff56d502ce2a541269fd55a4ecd8da9 to your computer and use it in GitHub Desktop.
Save roddux/cff56d502ce2a541269fd55a4ecd8da9 to your computer and use it in GitHub Desktop.
beware: advanced secret techniques
diff -r concrete5-8.5.1/concrete/controllers/backend/file/folder.php html/concrete/controllers/backend/file/folder.php
18a19
> echo "<!-- add folder woo -->\n";
diff -r concrete5-8.5.1/concrete/src/Http/DefaultDispatcher.php html/concrete/src/Http/DefaultDispatcher.php
106a107
> echo "<!-- handleDispatch: " . $request->getRequestUri() . "-->\n";
109c110,111
< $route = $this->router->matchRoute($request)->getRoute();
---
> $route = $this->router->matchRoute($request)->getRoute();
> echo "<!-- got route -->\n";
132c134,135
< if ($callDispatcher) {
---
> if ($callDispatcher) {
> echo "<!-- got a callDispatcher -->\n";
diff -r concrete5-8.5.1/concrete/src/Http/Middleware/FrameOptionsMiddleware.php html/concrete/src/Http/Middleware/FrameOptionsMiddleware.php
40d39
<
diff -r concrete5-8.5.1/concrete/src/Http/ResponseFactory.php html/concrete/src/Http/ResponseFactory.php
225a226
> echo "<!-- ResponseFactory collection() -->\n";
diff -r concrete5-8.5.1/concrete/src/Http/RouteDispatcher.php html/concrete/src/Http/RouteDispatcher.php
36c36
< $action = $this->router->resolveAction($this->route);
---
> $action = $this->router->resolveAction($this->route);
diff -r concrete5-8.5.1/concrete/src/Page/Page.php html/concrete/src/Page/Page.php
203a204
> //echo "<!-- getByID( $cID )-->\n";
217a219
> // echo "<!-- $cID/$version/$class -->\n";
252a255
> //echo "<!-- populatePage() -->\n";
267c270,271
< foreach ($row as $key => $value) {
---
> foreach ($row as $key => $value) {
> //echo "<!-- setting $key:$value -->\n";
499a504
> echo "<!-- Page::getFromRequest -->\n";
502a508
> echo "<!-- return getCurrentPage() -->\n";
505a512
> echo "<!-- got request->getPath '".$request->getPath()."' -->\n";
533a541
> echo "<!-- got content ID '$cID' and content Path '$cPath' -->\n";
diff -r concrete5-8.5.1/concrete/src/Routing/RouteActionFactory.php html/concrete/src/Routing/RouteActionFactory.php
14c14,16
< if ($route->getAction() instanceof \Closure) {
---
> echo "<!-- createAction inside RouteActionFactory -->\n";
> if ($route->getAction() instanceof \Closure) {
> echo "<!-- closure action -->\n";
27a30
> echo "<!-- $class.$method -->\n";
diff -r concrete5-8.5.1/concrete/src/Routing/Route.php html/concrete/src/Routing/Route.php
116a117,120
> public function getDebugPath()
> {
> return $this->getPath();
> }
117a122,145
> function is_closure($t) {
> return is_object($t) && ($t instanceof Closure);
> }
>
>
> public function getDebugAction()
> {
> $class = null;
> $method = null;
> $action = $this->action;
> if (is_string($action)) {
> list($class, $method) = explode('::', $action);
> } else {
> if (!($action instanceof \Closure)) {
> $class = $action[0];
> $method = $action[1];
> } else {
> $class="(Closure)";
> $method="$(Closure)";
> }
> }
>
> return "$class.$method";
> }
diff -r concrete5-8.5.1/concrete/src/Routing/Router.php html/concrete/src/Routing/Router.php
151a152
> echo "<!-- resolveAction -->\n";
182a184
> echo "<!-- getRouteByPath( '$path' ) -->\n";
184c186,193
< $potentialRoutes = $this->filterRouteCollectionForPath($this->getRoutes(), $path);
---
> echo "<!-- normalised: '$path' -->\n";
> $potentialRoutes = $this->filterRouteCollectionForPath($this->getRoutes(), $path);
> echo "<!-- route dump:\n";
> foreach($this->getRoutes()->all() as $val) {
> echo $val->getDebugPath() . " : " . $val->getName() . " : " . $val->getDebugAction() . "\n";
> }
> echo "-->\n";
> echo "<!-- starting urlmatcher -->\n";
185a195
> echo "<!-- got matcher -->\n";
187a198
> echo "<!-- returning potentialRoutes -->\n";
197a209
> echo "<!-- matchRoute() -->\n";
337a350
> echo "<!-- filterRouteCollectionForPath( $path ) -->\n";
diff -r concrete5-8.5.1/concrete/vendor/symfony/routing/Matcher/UrlMatcher.php html/concrete/vendor/symfony/routing/Matcher/UrlMatcher.php
72a73
> echo "<!-- symfony match() -->\n";
77a79
> echo "<!-- didn't match any collections -->\n";
82a85,86
> echo "<!-- going to throw something -->\n";
> echo 0<\count($this->allow) ? "<!-- MethodNotAllowed -->\n" : "<!-- ResourceNotFound -->\n";
120a125
> echo "<!-- symfony matchCollection() -->\n";
186a192
> echo "<!-- symfony matchCollection() returning -->\n";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment