Skip to content

Mrtango improve protection#6

Open
MrTango wants to merge 4 commits into
masterfrom
mrtango-imrpove-protection
Open

Mrtango improve protection#6
MrTango wants to merge 4 commits into
masterfrom
mrtango-imrpove-protection

Conversation

@MrTango

@MrTango MrTango commented May 24, 2022

Copy link
Copy Markdown

No description provided.

@MrTango MrTango changed the title Mrtango imrpove protection Mrtango improve protection May 24, 2022

@mauritsvanrees mauritsvanrees left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@mauritsvanrees

Copy link
Copy Markdown
Member

I have merged my own PR for adding GitHub Actions, so you can rebase on master now.

@MrTango MrTango force-pushed the mrtango-imrpove-protection branch from b1feaf7 to 23b4fb8 Compare September 7, 2022 12:37

@mauritsvanrees mauritsvanrees left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some remarks:

  1. 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?
  2. This leads to multiple inputs having the same id.
  3. This should be done in our transform in auto.py as well.

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