aboutsummaryrefslogtreecommitdiff
path: root/backend/db
diff options
context:
space:
mode:
authorjackyzha0 <[email protected]>2021-03-07 08:13:10 -0800
committerjackyzha0 <[email protected]>2021-03-07 08:13:10 -0800
commita9b72af75a9f9cc2be8cdec581133c0e9a301520 (patch)
treef8d966ca52919047eb8fa74822af7c5d90d29710 /backend/db
parentMerge pull request #71 from jackyzha0/http-refactor (diff)
downloadctrl-v-a9b72af75a9f9cc2be8cdec581133c0e9a301520.tar.xz
ctrl-v-a9b72af75a9f9cc2be8cdec581133c0e9a301520.zip
remove ip from hash calculation
Diffstat (limited to 'backend/db')
-rw-r--r--backend/db/db.go4
1 files changed, 2 insertions, 2 deletions
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)