pseudozach / wp-lightning-comments

Repository for Wordpress plugin wp-lightning-comments
GNU General Public License v3.0
2 stars 2 forks source link

Make payment valid for all posts #4

Closed Sjors closed 2 years ago

Sjors commented 2 years ago

Right now it seems the payment only allows you to comment on one post. I'd like it to be valid for all posts (this could be a setting).

In terms of the cat and mouse game between spammers and honest users, the current behaviour is overkill :-)

pseudozach commented 2 years ago

Fair enough, you may have noticed when a payment is made we set a parameter in localstorage so this should be an easy to implement as a configurable flag.

pseudozach commented 2 years ago

this commit should fix this issue: https://github.com/pseudozach/wp-lightning-comments/commit/78d7e228a2f615aa5b0e62a5ef00487ecc34026b

give it a try and let me know if it's ok

Sjors commented 2 years ago

Works!

Sjors commented 2 years ago

When the cat & mouse game with spammers gets more interesting, you may want to use a less trivial cookie value. The easiest might be to store a hash on the server and a pre-image on the client. The pre-image could be: invoice id + path.

That still allows spammers to copy the preimage between browsers. If that happens we could limit a preimage to e.g. 10 comments.