LoveIt icon indicating copy to clipboard operation
LoveIt copied to clipboard

[BUG] Gitalk: Comment shared

Open barddust opened this issue 2 years ago • 0 comments

Question

There comes a weird thing after Gitalk and LoveIt set down: two different posts use the same comments. image image

Attention to URLs, they are not the same, but with the exactly same comment, where I found in the same Issue. image

I submitted that comment only in the 1st post.

What I found

Firstly, Gitalk use a key `id' to distinguish different posts. image

Then, I looked into the source code of LoveIt, and I found an unbelievable thing: .Date is used as default value of 'id'! The file is layouts/partials/comment.html image

I checked that above posts: they have the same Id. image

image

Of coz they share the same comments!

Test

I fixed that point replacing .Date by (md5 .File.Path) ( the md5 of relative path to content ).

They have different id now. image image

Two different issues generated. image

Comments are not shared. image

image

Problem solved!

Is this considered as a bug?

barddust avatar Sep 11 '22 14:09 barddust