imh

Check-in [f7f1e1a0b0]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Defend against random character sets
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | master | trunk
Files: files | file ages | folders
SHA3-256:f7f1e1a0b0e25546306860e9101b65c416037b1b929e345908bfa5768881772e
User & Date: vandys 2020-02-10 00:55:22
Context
2020-02-10
00:55
Deal with long idle intervals, try to handle with a server reconnection. check-in: 0863d3a0d4 user: vandys tags: master, trunk
00:55
Defend against random character sets check-in: f7f1e1a0b0 user: vandys tags: master, trunk
2018-07-10
00:31
Dogfood tauthon check-in: 1b7ebbdd62 user: vandys tags: master, trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to forw.py.

1
2
3
4
5
6

7
8
9
10
11
12
13
..
56
57
58
59
60
61
62

63
64
65
66
67
68
69
#!/usr/local/bin/tauthon
# forw.py
#       Send a message onward
#
import os, sys
import comp


class Forw(comp.Comp):

    # Unlike Comp, we need the server so we can get
    #  a copy of the message(s) to forward
    def need_server(self):
        return True
................................................................................
            if t is None:
                sys.stderr.write("%d: no message body\n")
                continue

            # Quote it into the body
            f.write("[%s writes:]\n" % (sender,))
            for l in t.split('\n'):

                if l:
                    f.write("> %s\n" % (l,))
                else:
                    f.write(">\n")
            f.write("\n")

        f.close()






>







 







>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
..
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#!/usr/local/bin/tauthon
# forw.py
#       Send a message onward
#
import os, sys
import comp
from chore.utils import uncharenc

class Forw(comp.Comp):

    # Unlike Comp, we need the server so we can get
    #  a copy of the message(s) to forward
    def need_server(self):
        return True
................................................................................
            if t is None:
                sys.stderr.write("%d: no message body\n")
                continue

            # Quote it into the body
            f.write("[%s writes:]\n" % (sender,))
            for l in t.split('\n'):
		l = uncharenc(l)
                if l:
                    f.write("> %s\n" % (l,))
                else:
                    f.write(">\n")
            f.write("\n")

        f.close()