home
readme
diff
tree
note
docs
0commit c81703cf7f0f683bfdee18b2fd28d3012af37d56
1Author: lakefox <mason@lakefox.net>
2Date: Mon Feb 2 15:44:04 2026 -0700
3
4 Fix subscribing and unsubscribing
5
6diff --git a/cgi-bin/git.awk b/cgi-bin/git.awk
7index a65f006..0dc95e4 100755
8--- a/cgi-bin/git.awk
9+++ b/cgi-bin/git.awk
10@@ -140,11 +140,9 @@ BEGIN {
11 cmd = "git --git-dir=/var/git/" name ".git/ show " hash ":docs/" path " | mandoc -O width=120";
12
13 print "<pre><code>"
14- print "test" > "/test.txt"
15 while ((cmd | getline) > 0) {
16-gsub(/.\010/, "", $0);
17+ gsub(/.\010/, "", $0);
18 print escape_html($0);
19- print escape_html($0) >> "/test.txt"
20 }
21 print "</code></pre>"
22
23diff --git a/cgi-bin/mailto.awk b/cgi-bin/mailto.awk
24index 34483b8..242b402 100755
25--- a/cgi-bin/mailto.awk
26+++ b/cgi-bin/mailto.awk
27@@ -188,7 +188,7 @@ function openMail(folder, uid) {
28 print "</head>"
29 print "<body>"
30
31- cmd = "cat '/var/mailto/.cache/" folder "/*.'" uid
32+ cmd = "cat /var/mailto/.cache/" folder "/*." uid
33
34 while (cmd | getline line) {
35 print line
36@@ -276,7 +276,7 @@ function getThreads(username, password, inbox) {
37 function sanitize(str) {
38 # Remove any character that isn't a letter, number, dot, dash, or underscore
39 # This prevents shell metacharacters like ; | & $ > < ( ) from reaching the shell
40- gsub(/[^a-zA-Z0-9.\/_-]/, "", str)
41+ gsub(/[^a-zA-Z0-9.\%\/_-]/, "", str)
42
43 # Prevent Directory Traversal (e.g., ../../../etc/passwd)
44 gsub(/\.\./, "", str)
45diff --git a/index.html b/index.html
46index 8c459d1..55e8212 100644
47--- a/index.html
48+++ b/index.html
49@@ -37,19 +37,19 @@
50 <td><a href="http://git.ws/cgi-bin/git.awk?name=grim&hash=HEAD&action=readme">grim/</a></td>
51 <td>HTML/CSS renderer with a C++ DOM API</td>
52 <td><a target="_blank" href="https://web.libera.chat/gamja/?autojoin=#grim">#grim</a></td>
53- <td><a href="http://git.ws/cgi-bin/repo/grim.git">http://git.ws/cgi-bin/repo/grim.git</a></td>
54+ <td><a href="http://git.ws/repo/grim.git">http://git.ws/repo/grim.git</a></td>
55 </tr>
56 <tr>
57 <td><a href="http://git.ws/cgi-bin/git.awk?name=gitws&hash=HEAD&action=readme">git.ws/</a></td>
58 <td>All the scripts that run git.ws (mailto.awk/git.awk)</td>
59 <td><a target="_blank" href="https://web.libera.chat/gamja/?autojoin=#gitws">#gitws</a></td>
60- <td><a href="http://git.ws/cgi-bin/repo/gitws.git">http://git.ws/cgi-bin/repo/gitws.git</a></td>
61+ <td><a href="http://git.ws/repo/gitws.git">http://git.ws/repo/gitws.git</a></td>
62 </tr>
63 <tr>
64 <td><a href="http://git.ws/cgi-bin/git.awk?name=spectre&hash=HEAD&action=readme">spectre/</a></td>
65 <td>Fast router OS</td>
66 <td><a target="_blank" href="https://web.libera.chat/gamja/?autojoin=#spectre">#spectre</a></td>
67- <td><a href="http://git.ws/cgi-bin/repo/gitws.git">http://git.ws/cgi-bin/repo/spectre.git</a></td>
68+ <td><a href="http://git.ws/repo/gitws.git">http://git.ws/repo/spectre.git</a></td>
69 </tr>
70 </tbody>
71 </table>