Skip to content

Conversation

@danielmaier42
Copy link

Hi,

first of all - thank you very much for your work!

I currently tried to use it in one of my projects to automatically generate .htaccess based redirects out of the Database.

While implementing it, i noticed the from host <> to host validation is kind of interchanged.

Br,
Daniel :)

@donatj
Copy link
Owner

donatj commented Oct 21, 2022

Hmm...

I've been pondering this on and off for a couple hours since you submitted the PR

I think the error message might just be a typo - let me explain my reasoning


Currently the tool doesn't allow

/test.html	http://example.com/test2.html

Your change would allow that but disallow

http://example.com/test.html /test2.html

I can definitely come up with a reason for the first not to work. - it doesn't make clear if the host changed.

The second one I can reasonably safely assume the host did not change - so we definitely don't want to block that.


I also wonder if a FROM specifying a host should always verify the host of the request - which we currently only do if both TO and FROM have hosts.

I'm half wondering if a new setting, some sort of host-check strictness option is in order here…

Let me ponder some more and get back to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants