litespeedtech / litespeedtech/openlitespeed
Combination of Password Protection and Rewriting Rules not possible
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 1.5k
- Forks
- 233
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 5
Description
Dear all I recognized an issue with v1.7.1.6 that the password protection is not working in case I have context specified for a virtual location (when it does not exist on the filesystem) and rewriting rules have been applied.
Example
1. specif a static context with a virtual URI e.g. "/backend/"
2. specify rewriting rule to map any request to "index.php" in this context
```
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php
```
3. specify for this context a password protection through realm
result: No password protection will appear but the rewriting get applied
I also tried to make use of other contexts like "Litespeed SAPI" with "/backend/" but this is not usable because I can not specify any rewriting rules at this context.
So how can I achieve to have for a virtual location a password protection enabled for which then later the rewriting rules can be applied / used?
According to my understanding and comparison to Apache, I think the password protection has first to be evaluated and then afterwards the rewriting rules.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the reported configuration using a static virtual context at /backend/, the shown rewriting rules, and realm-based password protection. Compare the result with the expected order of authentication and rewriting described in the issue; done means password protection works while requests can still be rewritten to index.php.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- authentication, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100