The security of comments and webmentions

I’m currently in the process of re-making my blog to be self-hosted by using Eleventy. Until now, it has been hosted on WordPress.com but I want more control over the site and ownership of my content. The final piece that I need to re-build is the ability to leave comments under posts.

I have been researching different ways to do this and have landed on two possibilities: use a third-party comment widget or use webmentions. The problem is that I am very new to webmastery and I don’t want to accidentally put people’s information in danger if they leave a comment on my blog. I want commenting to be secure and not gather any unnecessary data.

I’ve come across webmentions.io as a hosted service and many guides on how to implement it, but I am wondering how can I make sure that whatever a person enters is safe and that their info is safe when they comment? Is webmentions.io safe enough by itself?

As for the third-party widgets; I’ve seen some in the Resources List for the Personal Web, as well as the Comments widget by WidgetStar but I don’t think any of these are open-source, so I can’t figure out how safe they are to use.

Commenting is really important for my blog since I created it to be a safe space where people can talk about girly nostalgic media so I really want to enable it even if my site moves off of WordPress.

Webmentions really aren’t the same as comments. Using them requires others to have their own websites and be able to send webmentions, which you would then aggregate and display on your site.

There are FOSS comment systems listed, but they either require a self-hosted web app with a data base or are tied to GitHub (like Giscus, which uses Github Discussions). For example, there’s Isso as a self-hosted option. It’s built with Python, and these are its installation instructions. I’m a developer and sysadmin by trade, and I can’t be bothered to go through all of this hassle just to have comments on my website.

You could also run your own forum, but that’s going to be more expensive than just self-hosting a static site with Eleventy. Also, no matter what you do, getting old comments out of WordPress.com is going to be Hell.

1 Like

Yeah I can’t be bothered to self-host a whole web app just for comments either. Plus, I’m not at that skill-level yet. I saw Giscus and other similar systems but I would like for the comments to be open to everyone. Or at least everyone with a mastodon account or something like that, since the average person is not likely to have a GitHub account.

Oh dw, I have firmly accepted that the old comments will stay on WordPress.com. So, the best solution would be to just use a third-party widget?

EDIT/ I forgot to answer about webmentions. I saw that they can be used with FediVerse accounts or Bluesky, so that’s why I’m considering them

You could also use client-side JS to pull replies to a specified Mastodon post as comments, if your friends are on the Fediverse.

That is true. I saw that while researching. That might be the best option then. I’ll see if I can make that code work with Eleventy. I know that other people have done it with Eleventy specifically but I never know who has done a good job at sanitising the replies.

I think the author mentioned using DOMPurify to sanitize incoming data from Mastodon. If you use his code you’ll probably get sanitization with it.

1 Like

Honestly, a lot of this code is unknown to me so I think I need to brush up on my JS before attempting to understand it. This is my first project that takes any kind of external input. I might just end up using Ayano’s comment widget even though it uses Google Forms and Sheets to gather and store comments. I’ve also contacted a few developers of some comment widgets to ask about the data they collect. Depending on their answers, that might be a good options too.

Thank you for your help though. I appreciate knowing more about how this could work :3

What kind of sanitising are you looking for?

I built Blog comments via Mastodon : Juha-Matti Santala for my website (but haven’t used it in a while because I couldn’t figure out a good way to tell people their Mastodon posts would appear on my site) but it’s one more Eleventy example.

2 Likes

Thanks, but I don’t think I helped much. I don’t do webmentions or comments on my site, after all.

1 Like

That’s also a valid point actually. I’m thinking that it might be okay to do it because anyone can see Mastodon posts even without an account.

I’m thinking of sanitisation to prevent XSS attacks, like in this post on Mastodon Comments

I feel bad posting this so much, but here’s my comment solution for 11ty:

I also host my own mirror of webmention.io (which uses the original human-made Ruby version instead of the new PHP version made with Claude Code) at https://webmention.folk.zone (it works the exact same way, you just replace “.io” with “.folk.zone”)

3 Likes

I’m running isso comments in a container with automatic updates on a separate server, I don’t ask for email, and the name box is optional. That probably covers security well enough for me to stop thinking about it.

Mastodon (activitypub) seems very poorly designed for comments because I don’t think there’s any way for you to control what replies other users see on other servers.

2 Likes

At the risk of veering off topic, what’s the story on that? Was that announced anywhere?

A couple of posts on that front:

It’s a big part of why I’m personally dissatisfied with the prevalence of “discuss on Mastodon” around the indie web.

Not an easy problem to address, though. Everything has its downsides.

1 Like

Just to clarify, you mean a mirror of webmention.io, right, not a mirror “of webmentions” in the general sense? As far as I’m aware, the general concept of “webmentions” just refers to a protocol.

1 Like

No I haven’t seen it announced anywhere, but you can see Claude as a contributor to the repository, it’s now a “PHP” branch which has been getting a lot of updates vs. the “main” branch which hasn’t been updated since April. Same goes for Aaron’s many other projects.

Edit: he seemed to pick up interest recently, and has even made a few (not really good imo) genAI images.

To be honest, I don’t really know how to reckon with this. I’ve always thought of the IndieWeb as having an inherently anti-genAI ethos, but Aaron was one of the initial founders of the IndieWebCamp and their wiki, which many people (including myself) conflate with the lowercase indie web.

Yes, sorry about that!

2 Likes

Oh no, how cringe. I think this is one of the issues of having particular figures be (implicitly) associated with a movement or community – I’m sure there are a lot of IndieWeb people who are anti-AI, but when the most central person is a fan of it, it kind of taints the whole thing by association.

Edit: this was meant to be a reply to @brennan’s most recent post but yet again this unreliable forum software seems to have decided not to display it as such.

1 Like

The atproto equivalent for this would be searching searching for mentions of your article. You can see an example of Semble doing this for one of my articles here:

And the api to fetch the mentions as json is just https://api.bsky.app/xrpc/app.bsky.feed.searchPosts?q=<url>&url=<url>&sort=latest&limit=100, replacing the url with your article’s url, as an encoded uri component. The redundant query param is so it gets pages that embed your link as well. No api keys and its cors enabled so it can be safely done client side on a static site.

1 Like

I see. I hope you’ll keep the webmentions reciever on folk.zone running because now I’m thinking about switching over.

Also, I left a comment on your recent post about webmention dot io. Let me know if you plan to link it on Pillowfort or whether I should go ahead and share it there myself.

Anyway, @DorianBay I’m not sure if you’re looking for more suggestions, but there’s also another thread on Commenting Systems & Services.

2 Likes

No need to feel bad @brennan :3 I was considering webmentions.io as a possibility but now I’m glad I didn’t do it. It’s amazing to have someone re-make it using actual human skill, so thank you for that! I don’t know if I’ll end up using webmentions but if I do I’ll let you know

1 Like

Thank you @Coyote , I for sure still am looking. I’ve actually just tried Commentbox and decided not to use it a few moments ago. The demo that you first see when going on their site shows that people can leave anonymous comments. However, when I embedded the widget, the anonymous option was nowhere to be found.

I’m currently looking into some other systems listed though. Someone mentioned that there’s always a trade-off with them and I cand definitely see it. A lot of the indie Systems look really good but might be more vulnerable due to the small size, while the big systems are either paid or don’t give what they advertise.

1 Like