[Fusionforge-commits] FusionForge branch Branch_5_1 updated. f6bd8fa0be9537a1c05d9e83c0c3c870e1809d64
Thorsten Glaser
mirabilos at fusionforge.org
Wed Feb 26 16:16:59 CET 2014
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".
The branch, Branch_5_1 has been updated
via f6bd8fa0be9537a1c05d9e83c0c3c870e1809d64 (commit)
from 54b3e3731d97478b4cb1a96e954847f794b6d53d (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit f6bd8fa0be9537a1c05d9e83c0c3c870e1809d64
Author: Thorsten Glaser <t.glaser at tarent.de>
Date: Wed Feb 26 16:16:52 2014 +0100
prevent SQL error early on
diff --git a/src/common/include/RBACEngine.class.php b/src/common/include/RBACEngine.class.php
index c9b056d..7a96f69 100644
--- a/src/common/include/RBACEngine.class.php
+++ b/src/common/include/RBACEngine.class.php
@@ -116,7 +116,12 @@ class RBACEngine extends Error implements PFO_RBACEngine {
$result[] = RoleAnonymous::getInstance() ;
$result[] = RoleLoggedIn::getInstance() ;
- $uid = is_object($user) ? $user->getID() : $user;
+ $uid_s = is_object($user) ? $user->getID() : $user;
+ $uid = util_nat0($uid_s);
+ if ($uid === false) {
+ /* no valid number; would make Postgres error out */
+ return $result;
+ }
if (USE_PFO_RBAC) {
$res = db_query_params ('SELECT role_id FROM pfo_user_role WHERE user_id=$1',
-----------------------------------------------------------------------
Summary of changes:
src/common/include/RBACEngine.class.php | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
hooks/post-receive
--
FusionForge
More information about the Fusionforge-commits
mailing list