litespeedtech / litespeedtech/openlitespeed

Combination of Password Protection and Rewriting Rules not possible

Open
#344 0 comments 0 reactions 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.