Mrtango improve protection#6
Conversation
mauritsvanrees
left a comment
There was a problem hiding this comment.
So this is meant to counter spammers that have grown smart enough to not fill in inputs with style="display: none", right? Seems good.
Problem though: when I try it, and manually set the two css properties in the web developer tools, the input is invisible, but the surrounding div still takes up space. Can you come up with some css or another way to hide the div as well? height: 0 does the trick when I put it on the element, but then you have to somehow specify on which element.
What would be good, is if this CSS would be in the package itself. Perhaps even simply as a viewlet, so you don't have to activate it from within the Modules control panel. But then: that is what the resource registry is for.
The css file could be a small browser view that displays the CSS dynamically with the HONEYPOT_FIELD already filled in. Calculating this once a startup should be enough.
Could you review my PR #7 where I replace Travis with GitHub Actions? Then rebase your branch on it. I think you will see a test failure because we test for the display: none literally being in the output. Other than that, it should be fine.
|
I have merged my own PR for adding GitHub Actions, so you can rebase on master now. |
b1feaf7 to
23b4fb8
Compare
mauritsvanrees
left a comment
There was a problem hiding this comment.
Some remarks:
- You added a section 'Hiding the field with CSS' to the readme, but this is no longer needed because it is already in
honeypot.pt, right? - This leads to multiple inputs having the same id.
- This should be done in our transform in
auto.pyas well.
No description provided.