I ran into a bug that I thought you might want to know about.
/edit.php:
PHP Code:
if (isset($_REQUEST["bbl"])) // bbl does not exist upon first clicking on the edit link on the blank screen. Therefore, authentication credentials are always invalid it seems.
{
require_once "accounts.php";
BB_RunPluginAction("accounts_loaded");
if (isset($bb_accounts["sessions"][$_REQUEST["bbl"]]))
{
$bb_session = $bb_accounts["sessions"][$_REQUEST["bbl"]];
if ($bb_session["expire"] < time()) {
BB_DeleteExpiredUserSessions();
} else {
$bb_account = $bb_accounts["users"][$bb_session["username"]];
}
}
}
I thought this stemmed from the fact that the edit link does not seem to include the bbl variable in the query string. Therefore, I added a dump of the sessions and added it manually.
PHP Code:
if (isset($_REQUEST["bbl"]))
{
require_once "accounts.php";
BB_RunPluginAction("accounts_loaded");
echo '<pre>'.print_r($bb_accounts["sessions"],true).'</pre>';
if (isset($bb_accounts["sessions"][$_REQUEST["bbl"]]))
{
$bb_session = $bb_accounts["sessions"][$_REQUEST["bbl"]];
if ($bb_session["expire"] < time()) {
BB_DeleteExpiredUserSessions();
} else {
$bb_account = $bb_accounts["users"][$bb_session["username"]];
}
}
}
So my new url was something like:
Code:
http://local.barebonescms-v1.0/?bb_action=bb_main_edit&bbl=d9710c9c72bfe5affa1c0b691602bf6ad3752e6b
Then, instead of getting a blank screen with single error I got the below. That is where I gave up…
Screen shot 2012-05-22 at 11.11.56 PM.png
By the way the logged in user would be the one with super permissions. I didn't define the other(s).
Bookmarks