diff --git a/core/ormdocument.class.inc.php b/core/ormdocument.class.inc.php index fa3f743f7..0227ac347 100644 --- a/core/ormdocument.class.inc.php +++ b/core/ormdocument.class.inc.php @@ -362,7 +362,7 @@ class ormDocument throw new Exception("Invalid id ($id) for class '$sClass' - the object does not exist or you are not allowed to view it"); } } - if (($sSecretField != null) && (hash_equals($oObj->Get($sSecretField), $sSecretValue))) { + if (($sSecretField != null) && !hash_equals($oObj->Get($sSecretField), $sSecretValue)) { throw new Exception("Invalid secret for class '$sClass' - the object does not exist or you are not allowed to view it"); } /** @var \ormDocument $oDocument */