Created
November 14, 2018 13:37
-
-
Save nickvergessen/b070db9acee75dfbf25f160c8a4710b0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
FAILS | |
* | |
* Your webserver seems to be not configured to use PHP or PHP is not installed. | |
* Please contact your administrator or follow our documentation: | |
* https://docs.nextcloud.com/server/13/admin_manual/installation/source_installation.html | |
* | |
* @copyright Copyright (c) 2016, ownCloud, Inc. | |
* | |
* @author Georg Ehrke <[email protected]> | |
* @author Joas Schilling <[email protected]> | |
* @author Jörn Friedrich Dreyer <[email protected]> | |
* @author Lukas Reschke <[email protected]> | |
* @author Morris Jobke <[email protected]> | |
* @author Robin Appelman <[email protected]> | |
* @author Sergio Bertolín <[email protected]> | |
* @author Thomas Müller <[email protected]> | |
* @author Vincent Petry <[email protected]> | |
* | |
* @license AGPL-3.0 | |
* | |
* This code is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU Affero General Public License, version 3, | |
* as published by the Free Software Foundation. | |
* | |
* This program is distributed in the hope that it will be useful, | |
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
* GNU Affero General Public License for more details. | |
* | |
* You should have received a copy of the GNU Affero General Public License, version 3, | |
* along with this program. If not, see <http://www.gnu.org/licenses/> | |
* | |
*/ | |
require_once __DIR__ . '/lib/versioncheck.php'; | |
try { | |
require_once __DIR__ . '/lib/base.php'; | |
$qb = \OC::$server->getDatabaseConnection()->getQueryBuilder(); | |
$result = $qb->select('*') | |
->from('authtoken') | |
->where($qb->expr()->eq('token', $qb->createNamedParameter($token))) | |
->execute(); | |
\OC\Log\ErrorHandler::onAll(12, '$message', '$file', 23); | |
} catch(\Exception $ex) { | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Okay, this is really fucked somehow,
$qb->createNamedParameter($token)
throws an Undefined variable (obviously) and then insidecreateNamedParameter
the parameters arenull, null, null
With
$qb->createNamedParameter('$token')
the parameters are'$token', 2, null
Which is clearly a PHP bug, but isolated I can not reproduce:
Why those error messages cause a segfault is a whole different story