sanitize public key

This commit is contained in:
Daniel Lugo 2020-06-10 11:47:43 -04:00
parent e6740d4c00
commit 668a9da9a9

View file

@ -1235,7 +1235,7 @@ const follow = (publicKey, isPrivate) => {
require('../Mediator')
.getUser()
.get(Key.FOLLOWS)
.get(publicKey)
.get(`$$__PK__${publicKey}`)
// @ts-ignore
.put(newFollow, ack => {
if (ack.err) {
@ -1256,7 +1256,7 @@ const unfollow = publicKey =>
require('../Mediator')
.getUser()
.get(Key.FOLLOWS)
.get(publicKey)
.get(`$$__PK__${publicKey}`)
.put(null, ack => {
if (ack.err) {
rej(new Error(ack.err))