Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting really large amount of spam comments #340

Closed
hajekj opened this issue Mar 14, 2020 · 8 comments
Closed

Getting really large amount of spam comments #340

hajekj opened this issue Mar 14, 2020 · 8 comments

Comments

@hajekj
Copy link

hajekj commented Mar 14, 2020

Hello, I am using staticman (hosted version) on my personal blog. Staticman is configured with reCaptcha from Google, yet I am getting really large amount of spam - https://github.com/hajekj/hajekj.github.io/pulls?q=is%3Apr+is%3Aclosed

The minimal mistakes theme also includes the "honeypot" field and so on, but it appears to have little no effect. Captcha is v2 checkbox set as "Most secure" but still nothing. I like #195 which would allow me to use Akismet with the hosted version. Any ideas what could help me?

@alexwaibel
Copy link
Collaborator

Sorry to hear you're experiencing large amounts of spam. For the fastest and most reliable solution, I'd definitely recommend switching to hosting your own instance on Heroku. Otherwise I'll still be looking into potentially merging that change but it may be some time as I'm quite busy lately.

@hajekj
Copy link
Author

hajekj commented Mar 31, 2020

I have checked the PR and it seems okay to me, so would be cool if you could sign-off on it.

@Lusitaniae
Copy link

Lusitaniae commented May 4, 2020

I removed the action param from the form and only put it together and add it back to the form after page load with JS.

Seems to have killed most bot comments

@hajekj
Copy link
Author

hajekj commented May 7, 2020

I fixed this by running my own instance along with Akismet - https://hajekj.net/2020/04/15/staticman-setup-in-app-service/

Looks like it works real good.

image

@hajekj hajekj closed this as completed May 7, 2020
@codeconomy
Copy link

codeconomy commented May 19, 2021

I removed the action param from the form and only put it together and add it back to the form after page load with JS.

Seems to have killed most bot comments

@Lusitaniae
Hi there, would you mind clarifying what you did here? (Trying to find a way to get rid of all the spam)

@Lusitaniae
Copy link

Lusitaniae commented May 19, 2021

Something like this


window.addEventListener('load', function(){

    var form = document.getElementsByTagName('form');
    base = "{{ .Site.Params.staticman.base }}"
    version = "{{ .Site.Params.staticman.version }}"
    target = "{{ .Site.Params.staticman.target }}"
    if(form.length > 0) {
      form[0].setAttribute('action', base + version + target);
    }

}, false);

The params:

[params.staticman]
  base = "https://comment.DOMAIN.com/"
  version = "v2"
  target = "/entry/GH-ACCOUNT/GH-REPO/master/comments"

@codeconomy
Copy link

codeconomy commented May 19, 2021

@Lusitaniae Many thanks for reverting quickly, got it now. Just implemented, waiting for the bots now.

@Lusitaniae
Copy link

Lusitaniae commented May 20, 2021

Hope it helps, was enough to solve the spam in my website (smallish website)

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

No branches or pull requests

4 participants