From a9b72af75a9f9cc2be8cdec581133c0e9a301520 Mon Sep 17 00:00:00 2001 From: jackyzha0 Date: Sun, 7 Mar 2021 08:13:10 -0800 Subject: remove ip from hash calculation --- backend/db/db.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'backend/db') diff --git a/backend/db/db.go b/backend/db/db.go index af68262..a9631af 100644 --- a/backend/db/db.go +++ b/backend/db/db.go @@ -29,9 +29,9 @@ const TitleLimit = 100 const ContentLimit = 100000 // creates a new paste with title, content and hash, returns the hash of the created paste -func New(ip, content, expiry, title, password, lang string) (string, error) { +func New(content, expiry, title, password, lang string) (string, error) { // generate hash from ip - hash := security.GenerateURI(ip) + hash := security.GenerateURI(content) // check for size of title and content errs := checkLengths(title, content) -- cgit v1.2.3