kixe Posted October 25, 2015 Posted October 25, 2015 Strange behaviour (lack of security?)Using selector $pages->get('title=""') results in admin/access/roles/guest/Result should be 0 (nullPage). /*unexpected return*/ var_dump($pages->get('title=""')->id); // return 37 var_dump($pages->find('title=""')->each('id') //return array(4) { [0]=> int(37) [1]=> int(38) [2]=> int(40) [3]=> int(41) } /*expected return*/ var_dump($pages->get('id=""')->id); // return 0 var_dump($pages->get('name=""')->id); // return 0 Workaround var_dump($pages->get('title="",has_parent!=2')->id); // return 0 var_dump($pages->get('name=""')->id); // return 0
Martijn Geerts Posted October 25, 2015 Posted October 25, 2015 Is it the superuser who made the search ? If that's yes, it is working properly. I don't see issues except when you do stupid things with the results. 3
horst Posted October 25, 2015 Posted October 25, 2015 (edited) There are always executed checks like isViewable, isEditable, isWhatEverNeeded in the context of the current $user. So, everything is fine, if a Superuser is able to access those pages. Edited October 25, 2015 by horst 3
kixe Posted October 25, 2015 Author Posted October 25, 2015 was the superuser. Thanks for the hint. 2
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now