From a6ec47965a732b1e905743363466a1ff6a0467da Mon Sep 17 00:00:00 2001 From: cgeek <cem.moreau@gmail.com> Date: Sun, 21 Sep 2014 12:28:39 +0200 Subject: [PATCH] UserID constraint extended to identity messages too --- app/lib/constants.js | 6 ++++++ bin/ucoind | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/app/lib/constants.js b/app/lib/constants.js index 45c1c8982..7d5b2ee40 100644 --- a/app/lib/constants.js +++ b/app/lib/constants.js @@ -49,6 +49,12 @@ module.exports = { SENDER: exact(PUBKEY), SOURCE: exact(INTEGER + ":(T|D|F):" + FINGERPRINT), TARGET: exact(PUBKEY + ":" + POSITIVE_INT) + }, + + setUDID2Format: function () { + module.exports.USER_ID = module.exports.UDID2_FORMAT; + module.exports.CERT.SELF.UID = exact("UID:" + UDID2); + module.exports.IDENTITY.INLINE = exact(PUBKEY + ":" + SIGNATURE + ":" + TIMESTAMP + ":" + UDID2); } }; diff --git a/bin/ucoind b/bin/ucoind index cade96fc2..7e8cf6b5b 100755 --- a/bin/ucoind +++ b/bin/ucoind @@ -416,7 +416,7 @@ program if (conf.udid2) { // UserID must match udid2 format - constants.USER_ID = constants.UDID2_FORMAT; + constants.setUDID2Format(); } // server -- GitLab