Bug in qbAclPlugin

26 views
Skip to first unread message

r.ruti...@docuteam.ch

unread,
Dec 7, 2021, 6:46:25 PM12/7/21
to AtoM Users
Hi,

There's a bug here:

Line 904

Wrong:
$allow ? Criteria::LESS_EQUAL : Criteria::GREAT_EQUAL

Correct:
$allow ? Criteria::LESS_EQUAL : Criteria::GREATER_EQUAL

Cheers, Roger
Message has been deleted

r.ruti...@docuteam.ch

unread,
Dec 7, 2021, 7:38:34 PM12/7/21
to AtoM Users
It's just that I was setting up user restrictions within groups, and when I clicked on an archival description where the logged in user should not have permisson to read, I got a white page, and in the nginx error I had the following entry:

2021/12/07 23:39:03 [error] 1573#1573: *1814 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Error: Undefined class constant 'GREAT_EQUAL' in /usr/share/nginx/atom/plugins/qbAclPlugin/lib/QubitAcl.class.php:904
Stack trace:
#0 /usr/share/nginx/atom/plugins/qbAclPlugin/lib/QubitAcl.class.php(854): QubitAcl::getAllowedResourcesCriterion(Object(Criteria), 'QubitInformatio...', Array, Array, false)
#1 /usr/share/nginx/atom/plugins/qbAclPlugin/lib/QubitAcl.class.php(695): QubitAcl::getFilterCriterion(Object(Criteria), Object(QubitInformationObject), 'viewDraft')
#2 /usr/share/nginx/atom/apps/qubit/modules/digitalobject/actions/imageflowComponent.class.php(62): QubitAcl::addFilterDraftsCriteria(Object(Criteria))
#3 /usr/share/nginx/atom/vendor/symfony/lib/helper/PartialHelper.php(388): DigitalObjectImageflowComponent->execute(Object(sfWebRequest))
#4 /usr/share/nginx/atom/vendor/symfony/lib/helper/PartialHelper.php(150): _call_component('digitalobject', 'imageflow', Array)
#5 /usr/share/nginx/atom/plugins/sfIsadPlugin/modules/sfIsadPlugin/templates/indexSuccess.p" while reading response header from upstream, client: 10.135.199.114, server: www.dummy.ch, request: "GET /index.php/blabla HTTP/1.1", upstream: "fastcgi://unix:/run/php7.2-fpm.atom.sock:", host: "www.dummy.ch", referrer: "https://www.dummy.ch/index.php/otherdummy"

When I changed it to GREATER_EQUAL the error did not appear anymore

Dan Gillean

unread,
Dec 8, 2021, 3:48:18 PM12/8/21
to ICA-AtoM Users
Hi Roger, 

Good catch - thanks for this! 

I have found the same issue in line 824 of our qa/2.x development branch. I filed an issue, discussed your fix with our developers (who agree with your assessment), implemented the change, and submitted it as a pull request so the fix can be included in the 2.7 release. 
Thanks again for bringing this to our attention!

Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory
he / him


On Tue, Dec 7, 2021 at 7:37 PM r.ruti...@docuteam.ch <r.ruti...@docuteam.ch> wrote:
It's just that I was setting up user restrictions within groups, and when I clicked on an archival description where the logged in user should not have permisson to read, I got a white page, and in the nginx error I had the following entry:

2021/12/07 23:39:03 [error] 1573#1573: *1814 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Error: Undefined class constant 'GREAT_EQUAL' in /usr/share/nginx/atom/plugins/qbAclPlugin/lib/QubitAcl.class.php:904
Stack trace:
#0 /usr/share/nginx/atom/plugins/qbAclPlugin/lib/QubitAcl.class.php(854): QubitAcl::getAllowedResourcesCriterion(Object(Criteria), 'QubitInformatio...', Array, Array, false)
#1 /usr/share/nginx/atom/plugins/qbAclPlugin/lib/QubitAcl.class.php(695): QubitAcl::getFilterCriterion(Object(Criteria), Object(QubitInformationObject), 'viewDraft')
#2 /usr/share/nginx/atom/apps/qubit/modules/digitalobject/actions/imageflowComponent.class.php(62): QubitAcl::addFilterDraftsCriteria(Object(Criteria))
#3 /usr/share/nginx/atom/vendor/symfony/lib/helper/PartialHelper.php(388): DigitalObjectImageflowComponent->execute(Object(sfWebRequest))
#4 /usr/share/nginx/atom/vendor/symfony/lib/helper/PartialHelper.php(150): _call_component('digitalobject', 'imageflow', Array)
#5 /usr/share/nginx/atom/plugins/sfIsadPlugin/modules/sfIsadPlugin/templates/indexSuccess.p" while reading response header from upstream, client: 10.135.199.114, server: www.dummy.ch, request: "GET /index.php/blabla HTTP/1.1", upstream: "fastcgi://unix:/run/php7.2-fpm.atom.sock:", host: "www.dummy.ch", referrer: "https://www.dummy.ch/index.php/ua-swissinfo"

When I changed it to GREATER_EQUAL the error did not appear anymore
r.ruti...@docuteam.ch schrieb am Mittwoch, 8. Dezember 2021 um 00:46:25 UTC+1:

--
You received this message because you are subscribed to the Google Groups "AtoM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ica-atom-users/82d598c5-3c56-46f2-9057-0c850f56d040n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages