Support blind key rotation #399

已合并
Plume_migration_agent 5 年前 将 3 次代码提交从 blind-key-rotation 合并至 master
所有者

Fix #398

  • try to fetch user when receiving an invalid signature
  • regenerate new key-pair when sending Delete activity
Fix #398 - [x] try to fetch user when receiving an invalid signature - [x] regenerate new key-pair when sending `Delete` activity
codecov[bot] 评论于 5 年前 (从 github.com 迁移)

Codecov Report

Merging #399 into master will increase coverage by 0.21%.
The diff coverage is 0%.

@@            Coverage Diff             @@
##           master     #399      +/-   ##
==========================================
+ Coverage   27.87%   28.08%   +0.21%     
==========================================
  Files          63       63              
  Lines        7254     7405     +151     
==========================================
+ Hits         2022     2080      +58     
- Misses       5232     5325      +93
# [Codecov](https://codecov.io/gh/Plume-org/Plume/pull/399?src=pr&el=h1) Report > Merging [#399](https://codecov.io/gh/Plume-org/Plume/pull/399?src=pr&el=desc) into [master](https://codecov.io/gh/Plume-org/Plume/commit/3128e6a3b9963bda81f482e972eb853c0d564d35?src=pr&el=desc) will **increase** coverage by `0.21%`. > The diff coverage is `0%`. ```diff @@ Coverage Diff @@ ## master #399 +/- ## ========================================== + Coverage 27.87% 28.08% +0.21% ========================================== Files 63 63 Lines 7254 7405 +151 ========================================== + Hits 2022 2080 +58 - Misses 5232 5325 +93 ```
igalic (从 github.com 迁移) 评审于 5 年前
igalic (从 github.com 迁移) 留下了一条评论

👀

👀
igalic (从 github.com 迁移) 评论于 5 年前

should we be printing stuff here?

should we be printing stuff here?
trinity-1686a 评审于 5 年前
发布者
所有者

I kept it because it was here before. If we had a proper logger this should get logged as this could be a an attack trial, but as it is, lost in stdout, I guess it's more of a debugging print?

I kept it because it was here before. If we had a proper logger this should get logged as this could be a an attack trial, but as it is, lost in stdout, I guess it's more of a debugging print?
igalic (从 github.com 迁移) 评审于 5 年前
igalic (从 github.com 迁移) 评论于 5 年前

i was wondering where our (debugging) log was

i was wondering where our (debugging) log was
elegaanz (从 github.com 迁移) 评审于 5 年前
elegaanz (从 github.com 迁移) 留下了一条评论

The code looks right, but I think I found a bug (maybe it's only me). To reproduce:

  • Create a@plume.one and b@plume.two
  • Make them follow each other
  • a@plume.one posts two articles, they are received on plume.two as they should
  • a@plume.one deletes one of these articles, and it is deleted on plume.two too
  • a@plume.one waits more than 10 minutes, and delete the second article
  • the Delete activity gets rejected by plume.two

Edit: also note that the next activities from a@plume.one are correctly received by plume.two

The code looks right, but I think I found a bug (maybe it's only me). To reproduce: - Create a@plume.one and b@plume.two - Make them follow each other - a@plume.one posts two articles, they are received on plume.two as they should - a@plume.one deletes one of these articles, and it is deleted on plume.two too - a@plume.one waits more than 10 minutes, and delete the second article - the `Delete` activity gets rejected by plume.two Edit: also note that the next activities from a@plume.one are correctly received by plume.two
elegaanz (从 github.com 迁移)5 年前 批准此合并请求
elegaanz (从 github.com 迁移) 留下了一条评论

It is working now. 👍 (but I don't understand what was wrong with the previous condition, and this one doesn't make sense for me)

It is working now. :+1: (but I don't understand what was wrong with the previous condition, and this one doesn't make sense for me)
发布者
所有者

previously, the first if would match in case of invalid request, and the second would do exactly the same, match on invalid request. But the first block is the Ok(()) one, so on invalid request it would say "ok this is fine".
Now the condition for the second if is inverted, so when the request is valid it returns Ok(()), when the request is invalid it returns the signature error

previously, the first `if` would match in case of invalid request, and the second would do exactly the same, match on invalid request. But the first block is the Ok(()) one, so on _invalid_ request it would say "ok this is fine". Now the condition for the second `if` is inverted, so when the request is _valid_ it returns Ok(()), when the request is invalid it returns the signature error

评审人

该合并请求已作为 c4a4ea5b6c 被合并。
你也可以查看 命令行指令

第一步:

从你的仓库中签出一个新的分支并测试变更。
git checkout -b blind-key-rotation master
git pull origin blind-key-rotation

第二步:

合并变更并更新到 Forgejo 上
git checkout master
git merge --no-ff blind-key-rotation
git push origin master
登录 并参与到对话中。
无审核者
未选择里程碑
未指派成员
2 名参与者
通知
到期时间
到期日期无效或超出范围。请使用 'yyyy-mm-dd' 格式。

未设置到期时间。

依赖工单

没有设置依赖项。

参考:Plume/Plume#399
正在加载...
这个人很懒,什么都没留下。