openidec

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 18c45ac3671183245f8efac9b5806afe7d9cbce1
parent a66985c3b4859803f4ea0667292b7f17e767d13b
Author: Peter Kosyh <p.kosyh@gmail.com>
Date:   Fri,  5 Feb 2021 09:40:10 +0000

access to hugeping echo

Diffstat:
Mii/db.go | 5+++++
1 file changed, 5 insertions(+), 0 deletions(-)

diff --git a/ii/db.go b/ii/db.go @@ -718,6 +718,11 @@ func (db *DB) GetTopics(mi []*MsgInfo) map[string][]string { // Store decoded message in database // If message exists, returns error func (db *DB) Store(m *Msg) error { + if r, _ := m.Tag("repto"); r == "" { // new one! + if m.Echo == "std.hugeping" && m.Addr != "ping,1" { + return errors.New("Access denied") + } + } return db._Store(m, false) }