~naglis

Kaunas, Lithuania

~naglis/public-inbox

Last active 2 months ago
View more

Recent activity

Suggestion to change sr.ht-security link in lists/todo 2 months ago

From Naglis Jonaitis to ~sircmpwn/sr.ht-discuss

Hello,

in the description of the mailing lists/bug trackers of sr.ht projects
there is a note:

> Do not report security-related issues here. Email them to
> [sr.ht-security](https://lists.sr.ht/~sircmpwn/sr.ht-security).

with a link to the `sr.ht-security` mailing list page. Since that
mailing list is private, we get a 401 Unauthorized, which is not very
helpful and for new users it might not be obvious how to construct
the email address from that.

I suggest to change the link to point to

[PATCH git.sr.ht] Do not use bare `except:` 2 months ago

From Naglis Jonaitis to ~sircmpwn/sr.ht-dev

According to PEP8[1]:

> A bare `except:` clause will catch SystemExit and KeyboardInterrupt
> exceptions, making it harder to interrupt a program with Control-C,
> and can disguise other problems.

Use more specific exceptions or `contextlib.suppress()` in case of
`try: ... except: pass`.

[1]: https://peps.python.org/pep-0008/#programming-recommendations
---
 gitsrht/blueprints/api/__init__.py | 2 +-
 gitsrht/blueprints/api/info.py     | 2 +-
 gitsrht/blueprints/manage.py       | 2 +-
[message trimmed]

[PATCH git.sr.ht] Use f-strings in `linecounter` 2 months ago

From Naglis Jonaitis to ~sircmpwn/sr.ht-dev

This is a bit simpler and has a marginal performance gain.
---
 gitsrht/blueprints/repo.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gitsrht/blueprints/repo.py b/gitsrht/blueprints/repo.py
index 90c8c8a..1bc86c2 100644
--- a/gitsrht/blueprints/repo.py
+++ b/gitsrht/blueprints/repo.py
@@ -103,7 +103,7 @@ def _highlight_file(repo, ref, entry, data, blob_id, commit_id):
def linecounter(count):
    out = []
    for i in range(1, count + 1):
        out.append('<a href="#L{}" id="L{}">{}\n</a>'.format(i, i, i))
[message trimmed]

[PATCH git.sr.ht] Fix undefined `ResponseError` 2 months ago

From Naglis Jonaitis to ~sircmpwn/sr.ht-dev

`ResponseError` is currently undefined. It manifests when an exception
is raised in the `try` block.

`ResponseError` was renamed[1] to `S3Error` in minio 7.0.0.

[1]: https://github.com/minio/minio-py/commit/b81883a98e6f8a09e2903609caabbf0956dd0ec9
---
 gitsrht/repos.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gitsrht/repos.py b/gitsrht/repos.py
index 4d7bc3f..ef79728 100644
--- a/gitsrht/repos.py
+++ b/gitsrht/repos.py
[message trimmed]

[PATCH sr.ht-docs] support: update security vulnerability report email 2 months ago

From Naglis Jonaitis to ~sircmpwn/sr.ht-dev

---
 support.md | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/support.md b/support.md
index a6b52da..ad2faba 100644
--- a/support.md
+++ b/support.md
@@ -69,7 +69,6 @@ or that you're unsure of the appropriate place to report your bug:

# Security vulnerabilities

Please send an email to [sir@cmpwn.com](mailto:sir@cmpwn.com), optionally using
the public key [7BC79407090047CA](https://drewdevault.com/publickey.txt). Please
[message trimmed]

forgeperf.org is down 2 months ago

From Naglis Jonaitis to ~sircmpwn/public-inbox

Hello,

I am not sure when it went down (currently I get a connection timeout),
perhaps during the DDoS attack in January.

Since the link is listed on sourcehut.org main page ("The fastest &
lightest software forge "), it would be good to bring it back / disable
the link in the meanwhile.

[PATCH abused] rules: use rule logger 2 months ago

From Naglis Jonaitis to ~sircmpwn/abused-devel

This allows to remove the rule name prefixes from the log message.
---
Sending as separate patch instead of v2 since the old commit message no
longer applies and I don't know if it is possible to change the commit
message when doing a v2 (if it is, how?).

 rules/commercial-isp.go | 2 +-
 rules/networks.go       | 6 +++---
 rules/tor-exit.go       | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/rules/commercial-isp.go b/rules/commercial-isp.go
index 5768cef..0cc63ce 100644
--- a/rules/commercial-isp.go
[message trimmed]

[PATCH abused] Fix rule name in log message 2 months ago

From Naglis Jonaitis to ~sircmpwn/abused-devel

---
I suspect this is a C/P leftover.

Also I was wondering why in this case the logger on the rule (`rule.log`) is
not used?

 rules/commercial-isp.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rules/commercial-isp.go b/rules/commercial-isp.go
index 5768cef..140a23d 100644
--- a/rules/commercial-isp.go
+++ b/rules/commercial-isp.go
@@ -75,7 +75,7 @@ func (rule *CommercialISPRule) Test(ctx context.Context, sample *model.Sample) i
[message trimmed]

[PATCH email-test-drive v3] Demonstrate that I can use git send-email 2 months ago

From Naglis Jonaitis to ~sircmpwn/email-test-drive

---
 naglis | 5 +++++
 1 file changed, 5 insertions(+)
 create mode 100644 naglis

diff --git a/naglis b/naglis
new file mode 100644
index 0000000..c91f99d
--- /dev/null
+++ b/naglis
@@ -0,0 +1,5 @@
I'm about to try git send-email

Botched it!
[message trimmed]