264 Commits

Author SHA1 Message Date
sirpy
9363ffddeb
fix: salt should not be random #1052
see #1052 
this causes hash tables to fail, because a different hash will be generated for content every time.
in case incomming salt is null, it will be set to always be the empty string
2021-02-18 10:07:20 +02:00
MIMIZA
1bbc308ceb fix bug 2020-12-19 01:14:26 +07:00
MIMIZA
6e0a6fe225 SEA.certify: fix bug 2020-12-19 00:24:03 +07:00
MIMIZA
49b2937421 SEA.certify() small bug fix + more unit test
There is a small bug and this is a fix for it. More unit tests added.
2020-12-16 15:51:37 +07:00
MIMIZA
0a91b8079b change SEA.certify() && check.pub() 2020-12-14 15:27:46 +07:00
MIMIZA
e2a92bd61e small fix 2020-12-14 02:36:50 +07:00
MIMIZA
34d7f6fc70 small fix 2020-12-14 02:28:46 +07:00
MIMIZA
d8d037fc81 SEA.certify: replace RegEx with RAD/LEX. New feature: Path must contain Certificant Pub
- RegEx replaced with RAD/LEX
- NEW FEATURE: If LEX has key "?" and lex['?'] contains '*': check if Certificant Pub is in Path
- Unit tests updated
Official doc will be written after this PR is merged.
2020-12-14 02:23:26 +07:00
MIMIZA
4d0bcab3b8 Add Blacklist feature to SEA.certify
Now SEA.certify supports Blacklist. For more details, please read doc here: https://gun.eco/docs/SEA#certify
2020-11-23 12:21:48 +07:00
MIMIZA
5ee816191a Improve SEA check.pub() 2020-11-14 13:44:20 +07:00
MIMIZA
5701b8b581 SEA.certify unit tests 2020-11-07 16:27:08 +07:00
mimiza
c95b99d376
Added a warning console.log to SEA.certify() 2020-10-28 19:38:14 +07:00
mimiza
c686a15980
Small fix 2020-10-27 16:55:22 +07:00
mimiza
04bbfdd2eb
Small fix 2020-10-27 15:44:45 +07:00
MIMIZA
bac237fa89 SEA.certify() completed. SEA check.pub() upgrade completed. Tests passed. Bugs free. 2020-10-27 14:26:11 +07:00
MIMIZA
37da3cc8ea improve SEA Cert security, still need much improvement in check.pub, unfinished 2020-10-26 23:53:04 +07:00
MIMIZA
be6dcf0f99 improve SEA Cert security, still need much improvement in check.pub, unfinished 2020-10-26 23:48:20 +07:00
MIMIZA
ebe8345090 finished prototyping, but need much refactoring 2020-10-26 15:56:04 +07:00
MIMIZA
80c74d254b refactoring cert prototype & check.pub, unfinished. 2020-10-24 23:27:53 +07:00
MIMIZA
97bbdd9b74 cert injection && validation done 2020-10-21 01:36:57 +07:00
mimiza
622a252722
prototyping SEA.certify() 2020-10-19 22:53:57 +07:00
MIMIZA
a7bb4a840f Update sea.js 2020-06-24 10:55:27 +07:00
MIMIZA
feb54f024b Update sea.js 2020-06-24 10:42:03 +07:00
MIMIZA
e74f4a00e2 Update sea.js 2020-06-24 10:35:21 +07:00
MIMIZA
ef837a1018 alias = alias || pair.pub 2020-06-24 10:26:46 +07:00
MIMIZA
6d8f776200 Fix user.create()
BEFORE:
- user.create(pair) --> ~@[object Object]
- (noop == cb) --> callback will never fire because functions can't be compared like this. For example:
```
const a = b = function(){};
a == b // FALSE
```

AFTER:
- user.create(pair) --> ~@pair.pub
- callback is fired
2020-06-22 21:18:24 +07:00
MIMIZA
01cd2050d2 improve sea.js
Removed the small try/catch in recall() because there is already a bigger try/catch.
2020-06-22 08:59:39 +07:00
MIMIZA
edc122f63c Improve user.recall()
Wrap JSON.parse() in a try{}catch{}
2020-06-19 12:38:52 +07:00
MIMIZA
e88a120a4e remove console.log 2020-06-15 08:40:00 +07:00
MIMIZA
486184e767 Switch to ancient technique
ES6 might not be reliable, so I decided to switch back to ancient JS. Removed spread operator (...args), replaced with "arguments"
2020-06-15 08:32:22 +07:00
MIMIZA
823df19593 Fix sea.js issues #962, #957, #956
BEFORE:
- user.recall() uses alias/pass -> not reliable, only works with auth(alias,pass), doesn't work with auth(pair)
- user.auth(pair, cb) -> cb is not a function

AFTER:
- user.recall() uses pair -> more reliable, works with auth(pair)
- user.auth(pair, cb) -> works
2020-06-13 11:55:19 +07:00
Mark Nadal
00c48f172b deprecate unofficial opt 2020-05-21 14:48:07 -07:00
Mark Nadal
9e811e882c tell Travis to use module :P 2020-05-21 14:40:19 -07:00
Hadar Rottenberg
d681c5ca91 Merge remote-tracking branch 'origin/master' into pr/sirpy/12 2020-05-21 22:05:19 +03:00
Mark Nadal
018fa8cc1e FIX user.set({obj not secure, + try fix hash & predictable souls + beta forgetfulness 2020-04-22 14:31:27 -07:00
Mark Nadal
47e7c495d7 up not found ack count before new soul + use more predictable offline souls + content address hash fix 2020-04-06 01:34:41 -07:00
Mark Nadal
fc58d3552a important offline fixes & assumption/default changes 2020-04-05 17:41:51 -07:00
Hadar Rottenberg
22a76f489d Merge branch 'amark-master' 2020-03-30 15:59:55 +03:00
Hadar Rottenberg
3520f04b36 Merge branch 'master' of https://github.com/amark/gun into amark-master 2020-03-30 15:57:08 +03:00
sirpy
6d05150ae8
fix: remove undefined/unused variable 2020-03-18 09:23:48 +02:00
Mark Nadal
9de7d0f38d fix chain emit & faith 2020-03-04 22:58:25 -08:00
Mark Nadal
da7c243fb0 rad check node read, important puffs 2020-03-04 02:18:49 -08:00
Mark Nadal
ff04e23b64 fix .pub on account check 2020-02-19 11:47:26 -08:00
Mark Nadal
3ab14ffc42 3rd rewrite, have batched acks. 2020-02-17 12:38:46 -08:00
Hadar Rottenberg
5016298b45 fix: typo 2020-02-12 21:17:15 +02:00
Hadar Rottenberg
72c699f20b add: restore old crypto package, isomorphic changes things in react-native 2020-02-12 21:07:24 +02:00
Mark Nadal
77263e40b7 allow sort / dynamic prefix on hash? 2020-02-12 11:06:02 -08:00
Hadar Rottenberg
a72342431f add: update to use webview-crypto 2020-02-12 09:54:04 +02:00
Mark Nadal
48b288280d Update sea.js 2020-02-10 18:25:01 -08:00
Mark Nadal
b45be18ad3 Update sea.js 2020-02-10 18:11:23 -08:00