~pingiun

Nijmegen, Netherlands

https://pingiun.com

~pingiun/nix-configs

Last active 5 months ago

~pingiun/fbhalve

Last active 5 months ago
View more

Recent activity

Re: [PATCH meta.sr.ht v2] Save b64_key and key_type in SSHKey table 5 months ago

From Jelle Besseling to ~sircmpwn/sr.ht-dev

> On 27 Aug 2019, at 03:37, Drew DeVault <sir@cmpwn.com> wrote:
> 
> I actually ended up reverting this partially, it broke hg.sr.ht pushes
> and uncached git.sr.ht key lookups.
Is this because the %k token does not give just the base64 portion of
the key? Because the %k token from sshd is what is used to look up
the key from meta.sr.ht is it not?

If you know what the exact string is that the %k will give to the
command I can probably fix the api.

[PATCH meta.sr.ht v2] Save b64_key and key_type in SSHKey table 5 months ago

From Jelle Besseling to ~sircmpwn/sr.ht-dev

Use a function from the sshpubkeys module to parse the base64 key data
from the ssh key. This allows the keys api to search the database
exactly based on the base 64 data.
---
This includes the _split_key function from sshpubkeys, but renamed to
extract_b64_key because I edited the function to only extract that part.

 ...a2_add_b64_key_and_key_type_options_to_.py | 24 ++++++++++++++
 metasrht/blueprints/api/keys.py               |  3 +-
 metasrht/types/sshkey.py                      | 31 +++++++++++++++++++
 3 files changed, 56 insertions(+), 2 deletions(-)
 create mode 100644 metasrht/alembic/versions/6cdf6b9f90a2_add_b64_key_and_key_type_options_to_.py

diff --git a/metasrht/alembic/versions/6cdf6b9f90a2_add_b64_key_and_key_type_options_to_.py b/metasrht/alembic/versions/6cdf6b9f90a2_add_b64_key_and_key_type_options_to_.py
[message trimmed]

[PATCH 2/3] Add addresses argument to forward command 5 months ago

From Jelle Besseling to ~sircmpwn/aerc

---
This is not strictly necessary for this patch set, but I found it useful
anyway.
 commands/msg/forward.go | 10 +++++++++-
 doc/aerc.1.scd          |  2 +-
 widgets/compose.go      |  7 +++++++
 3 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/commands/msg/forward.go b/commands/msg/forward.go
index d7ecf66..ca29096 100644
--- a/commands/msg/forward.go
+++ b/commands/msg/forward.go
@@ -8,6 +8,7 @@ import (
	"github.com/emersion/go-message"
[message trimmed]

[PATCH 3/3] Add forwarding as attachment feature 5 months ago

From Jelle Besseling to ~sircmpwn/aerc

This allows a single message to be forward as attachment with the
:forward -a command
---
 commands/msg/forward.go | 64 ++++++++++++++++++++++++++++++++++++++---
 doc/aerc.1.scd          |  4 ++-
 widgets/compose.go      |  9 ++++++
 3 files changed, 72 insertions(+), 5 deletions(-)

diff --git a/commands/msg/forward.go b/commands/msg/forward.go
index ca29096..a183af3 100644
--- a/commands/msg/forward.go
+++ b/commands/msg/forward.go
@@ -4,10 +4,16 @@ import (
	"bufio"
[message trimmed]

[PATCH 1/3] Move forward command to it's own file 5 months ago

From Jelle Besseling to ~sircmpwn/aerc

The two commands did not have much code in common
---
 commands/msg/forward.go | 104 ++++++++++++++++++++++++++++++++++++++++
 commands/msg/reply.go   |  96 ++++++++++---------------------------
 2 files changed, 130 insertions(+), 70 deletions(-)
 create mode 100644 commands/msg/forward.go

diff --git a/commands/msg/forward.go b/commands/msg/forward.go
new file mode 100644
index 0000000..d7ecf66
--- /dev/null
+++ b/commands/msg/forward.go
@@ -0,0 +1,104 @@
package msg
[message trimmed]

[PATCH 0/3] Add forwarding as attachment feature 5 months ago

From Jelle Besseling to ~sircmpwn/aerc

This partially fixes #137 but without threading support. 

https://todo.sr.ht/~sircmpwn/aerc2/136

Jelle Besseling (3):
  Move forward command to it's own file
  Add addresses argument to forward command
  Add forwarding as attachment feature

 commands/msg/forward.go | 168 ++++++++++++++++++++++++++++++++++++++++
 commands/msg/reply.go   |  96 +++++++----------------
 doc/aerc.1.scd          |   4 +-
 widgets/compose.go      |  16 ++++
 4 files changed, 213 insertions(+), 71 deletions(-)

[PATCH git.sr.ht] Update last_used value on ssh key on auth 5 months ago

From Jelle Besseling to ~sircmpwn/sr.ht-dev

Calls the meta.sr.ht api to update the last_used field on the ssh key
used for authentication.
---
This builds on a meta.sr.ht patch that I sent previously[0]. The
last_used field on ssh keys is currently not updated when the ssh key is
used (I believe). This series of patches enables updating that field for
git.sr.ht.

This is my first set of patches for the sr.ht project, I tried to follow
the code structure and conventions, however I don't fully understand
when to use the oauth API and when internal api methods can be used.
I'd like to work more on this patch even if I need to completely
restructure it.
[message trimmed]

[PATCH meta.sr.ht] Add last_used update internal api 5 months ago

From Jelle Besseling to ~sircmpwn/sr.ht-dev

Add API that can be used by scripts to update the last_used field for a
base64 ssh key.
---
This builds on a previous patch I sent for meta.sr.ht[0] that adds the
b64_key field to the SSHKey table. This new api can also be built using the
previous mechanism of using the ilike() method.

This new API can be used by the git.sr.ht scripts to update the
last_used value while only having a base64 key. (I will also send a
patch for this)

[0] https://lists.sr.ht/~sircmpwn/sr.ht-dev/patches/7502
 metasrht/blueprints/api/keys.py | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)
[message trimmed]

[PATCH meta.sr.ht] Save b64_key and key_type in SSHKey table 5 months ago

From Jelle Besseling to ~sircmpwn/sr.ht-dev

Use sshpubkeys to parse the base64 key data from the ssh key. This
allows the keys api to search the database exactly based on the base 64
data.
---
This is currently BLOCKED because it depends on my pull request on
python-sshpubkeys[0]. Alternatively we could reencode the private
_decoded_key field[1], or use the private _split_key method[2].

The split_key method could also be copied into the project as to protect
against changing private APIs.


[0] https://github.com/ojarva/python-sshpubkeys/pull/65
[1] https://github.com/ojarva/python-sshpubkeys/blob/9d6289c717a79dd8e49311af647877c95ebc41d3/sshpubkeys/keys.py#L116
[message trimmed]

[PATCH v3 1/1] Ignore scroll command when msgstore is nil 5 months ago

From Jelle Besseling to ~sircmpwn/aerc

Fixes ~sircmpwn/aerc2#205. Many functions do a nil check on the store,
so this changes Store() so it returns nil when msglist is nil.

It also places the Scroll() behind the nil check in the next-message command.

https://todo.sr.ht/~sircmpwn/aerc2/205
---
 commands/account/next.go | 4 ++--
 widgets/account.go       | 3 +++
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/commands/account/next.go b/commands/account/next.go
index 7b1f230..1ba4b1b 100644
--- a/commands/account/next.go
[message trimmed]