Comments (3)
I've updated hasRight locally to tidy up URLs before checking them. It enforces singular slashes and no leading slashes. Seems to fix the problem for me with no side effects yet.
public function hasRight($rule, $default = false)
{
$rule = ltrim($rule, '/');
$rule = preg_replace('(\/{2,})', '/', $rule);
...
I did see the other plugin, but opted for this as the other is a bit much for what I need
from pico-users.
Hi, thanks for the report.
It depends on how double slashes should be considered by Pico. It probably should be defined either as a different page (//
being a subdirectory without name), or dropped and redirected, but not dismissed as it seems to be now.
Anyway I'm not sure about the relevance of this plugin since a larger one have been made : https://github.com/picoauth/picoauth.
from pico-users.
Great, do not hesitate to make a PR.
from pico-users.
Related Issues (14)
- Unauthorized pages can be listed by other plugins HOT 2
- 403 pages shown as $previousPage and $nextPage
- feat: how admin users from external apps .. or API docs where?
- Anonymous user and rights HOT 1
- Plugin needs better session handling
- Login form not shown
- Cant log in HOT 3
- Undefined index: hash_type HOT 2
- Does Not Restrict Pages HOT 6
- Security: Don't store unhased passwords in sessions
- Security: Use password_hash() rather than hash() HOT 1
- split() was deprecated in PHP 5.3.0, and removed in PHP 7.0.0.
- Hide 403 pages from navigation
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pico-users.