Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  nodelist  faq  

If you're careful enough, nothing bad or good will ever happen to you.


rocksolid / Programming / Re: ok fixed

SubjectAuthor
* vichan outgoing attachments (2)Retro Guy
+* i have been working on a similar problemAnonymous
|`- Re: i have been working on a similar problemRetro Guy
+* he, that is richAnonymous
|`- Re: he, that is richRetro Guy
+- works with messages posted on def4Anonymous
+* NoneAnonymous
|`- Re: Vichan header (w/attachment)Retro Guy
+- the line beforeAnonymous
+* ok, bbs puts it in both linesAnonymous
|`* Re: ok, bbs puts it in both linesRetro Guy
| `- Re: ok, bbs puts it in both linesRetro Guy
+- ok, then it is settledAnonymous
+- yeah sureAnonymous
+* ok fixedAnonymous
|`* Re: ok fixedRetro Guy
| `* Re: ok fixedanon
|  `- Re: ok fixedRetro Guy
`* newsportal codeAnonymous
 `* Re: newsportal codeRetro Guy
  `- Re: newsportal codeRetro Guy

1
Subject: vichan outgoing attachments (2)
From: Retro Guy
Newsgroups: rocksolid.programming
Organization: Rocksolid Light
Date: Wed, 10 Jun 2020 03:59 UTC
Path: i2pn2.org!.POSTED!not-for-mail
From: Retro ...@rslight.i2p (Retro Guy)
Newsgroups: rocksolid.programming
Subject: vichan outgoing attachments (2)
Date: Wed, 10 Jun 2020 03:59 UTC
Organization: Rocksolid Light
Message-ID: <536716545ac3003ada9b38182d31871b$1@www.novabbs.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: i2pn2.org; posting-account="retrobbs1";
logging-data="16398"; mail-complaints-to="usenet@i2pn2.org"
User-Agent: Rocksolid Light (news.novabbs.com/getrslight)
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on novabbs.com
X-Rslight-Site: $2y$10$nAhjoTnrp.dhtfejtMkVc.7l6gQ8cUj65bUWgoPc8o4.DYrBgIKNe
View all headers
I've modified the header on an existing vichan post that did not show the name of the attachment in my news clients (rslight and knode).

Here's the new header:

----------
From: Anonymous <poster@anon.com>
Newsgroups: rocksolid.programming
Subject: vichan attachments
Date: Tue, 09 Jun 2020 11:45:08 -0700
Organization: i2pn2 (i2pn.org)
Message-ID: <abc-test5ts.1067.361szz@anon.com>
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary=298ed9daa54faf56bda88a006e74af5bf7bfb3d7

--298ed9daa54faf56bda88a006e74af5bf7bfb3d7
Content-Type: text/plain; charset=UTF-8

Modified a previous vichan post header to see if I can get the same post to show the name of the attachment:

and some text
--298ed9daa54faf56bda88a006e74af5bf7bfb3d7
Content-Disposition: form-data; filename="brian-miller-Sgb3OmpipWY-unsplash-860x484.jpg"; name="attachment"
Content-Type: image/jpeg; name="brian-miller-Sgb3OmpipWY-unsplash-860x484.jpg";
Content-Transfer-Encoding: base64
----------

This is from the original header:

Content-Type: image/jpeg

Adding the file name to the 'Content-Type:' header seems to do the trick.

Posting this again due to lack of sufficient brain activity on my part.

Retro Guy

--
Posted on: Rocksolid Light
www.novabbs.com


Subject: i have been working on a similar problem
From: Anonymous
Newsgroups: rocksolid.programming
Organization: def5
Date: Wed, 10 Jun 2020 10:01 UTC
Path: i2pn2.org!rocksolid2!def5!.POSTED.bogusentry!not-for-mail
From: pos...@anon.com (Anonymous)
Newsgroups: rocksolid.programming
Subject: i have been working on a similar problem
Date: Wed, 10 Jun 2020 03:01:18 -0700
Organization: def5
Message-ID: <code.255.1gecec@anon.com>
References: <536716545ac3003ada9b38182d31871b$1@www.novabbs.com>
Content-Type: text/plain; charset=UTF-8
Injection-Info: def5.org; posting-host="bogusentry:192.168.1.189";
logging-data="10098"; mail-complaints-to="usenet@def5.org"
View all headers
and i think it is the newsportal code that swallows the name somewhere along the road. taking the next post (because it has a very small attachment), this is what you get from article # on telnet:

220 3428 <ts.1068.1410jn@anon.com> article
Path: def5!.POSTED.bogusentry!not-for-mail
From: Anonymous <poster@anon.com>
Newsgroups: rocksolid.shared.test
Subject: and something really small
Date: Tue, 09 Jun 2020 11:47:07 -0700
Organization: def5
Message-ID: <ts.1068.1410jn@anon.com>
References: <ts.1067.361szz@anon.com>
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary=6c1d302fc476b126c246d0fcfb5876bebc92ae72
Injection-Info: def5.org; posting-host="bogusentry:192.168.1.189";
        logging-data="27749"; mail-complaints-to="usenet@def5.org"
Xref: def5 rocksolid.shared.test:3428

--6c1d302fc476b126c246d0fcfb5876bebc92ae72
Content-Type: text/plain; charset=UTF-8

and another text
--6c1d302fc476b126c246d0fcfb5876bebc92ae72
Content-Disposition: form-data; filename="test.jpg"; name="attachment"
Content-Type: image/jpeg
Content-Transfer-Encoding: base64

/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCACIAIYDASIAAhEBAxEB/8QAFwABAQEBAAAAAAAAAAAAAAAAAAcIBv/EABYQAQEBAAAAAAAAAAAAAAAAAAAWF//EABUBAQEAAAAAAAAAAAAAAAAAAAAE/8QAGBEBAQADAAAAAAAAAAAAAAAAABRhYqH/2gAMAwEAAhEDEQA/AJGK5lRlS2zXqOXKRiuZUZUWa9JcpGK5lRlRZr0lykYrmVGVFmvSXKRiuZUZUWa9JcpGK5lRlRZr0lykYrmVGVFmvSXKRiuZUZUWa9JcpGK5lQWa9JcqAOfESx0A58B0A58B0A58B0A58B0A58B0A58B0A58B0A58ACVJUAJUlQAlSVACVJUAJUlQAlSVACVJUAJUlQAlQFAAAAAAAAAAAAAAAAAABz9UVTP9UVQNAVRVM/1RVA0BVFUz/VFUDQFUVTP9UVQNAVRVM/1RVA0BVFUz/VFUDQFUVTP9UVQNAVRVM/1RVA0BVDP9UAEq0BKkqDP8qSrQEqSoM/ypKtASpKgz/Kkq0BKkqDP8qSrQEqSoM/ypKtASpKgz/Kkq0BKkqDP8qSrQEqSoM/yo0BKgOgAAAAAAAAAAAAAAAAABH9VNVSMWx7cR1YVzVTVUjCPbhVhXNVNVSMI9uFWFc1U1VIwj24VYVzVTVUjCPbhVhXNVNVSMI9uFWFc1U1VIwj24VYVzVTVUjCPbhVhXNVEjCPbhVgAXJAAAAAAAAAAAAAAAAH/2Q==
--6c1d302fc476b126c246d0fcfb5876bebc92ae72--


Subject: he, that is rich
From: Anonymous
Newsgroups: rocksolid.programming
Organization: def5
Date: Wed, 10 Jun 2020 10:48 UTC
Path: i2pn2.org!rocksolid2!def5!.POSTED.bogusentry!not-for-mail
From: pos...@anon.com (Anonymous)
Newsgroups: rocksolid.programming
Subject: he, that is rich
Date: Wed, 10 Jun 2020 03:48:10 -0700
Organization: def5
Message-ID: <code.256.3c2ebh@anon.com>
References: <536716545ac3003ada9b38182d31871b$1@www.novabbs.com>
Content-Type: text/plain; charset=UTF-8
Injection-Info: def5.org; posting-host="bogusentry:192.168.1.189";
logging-data="22642"; mail-complaints-to="usenet@def5.org"
View all headers
by putting the full message from telnet in the post (including the last line with just the dot), the post was cut when it was posted to the news server (that only reads until the first line with '.') lol. so here is the rest of the post, that you can only read in full on def2 now (btw, this should be a way to make local comments that are only visible on the node where they are posted - a new feature):

and this is the array you get from vichan_message_read (which should be the same as message_read as far as this is concerned):

messageType Object
(  
    [header] => headerType Object
        (  
            [number] =>
            [id] => <ts.1068.1410jn@anon.com>
            [from] => poster@anon.com
            [name] => Anonymous
            [subject] => and something really small
            [newsgroups] => rocksolid.shared.test
            [followup] =>
            [date] => 1591728427
            [date_thread] =>
            [organization] => def5
            [xnoarchive] =>
            [references] => Array
                (  
                    [0] => <ts.1067.361szz@anon.com>
                )

            [bestreference] =>
            [content_transfer_encoding] => 8bit
            [mime_version] =>
            [content_type] => Array
                (  
                    [0] => text/plain
                    [1] => image/jpeg
                )

            [content_type_charset] => Array
                (  
                    [0] => utf-8
                    [1] => utf-8
                )

            [content_type_name] => Array
                (  
                    [0] => unnamed
                    [1] => unnamed
                )

            [content_type_boundary] => 6c1d302fc476b126c246d0fcfb5876bebc92ae72
            [content_type_format] => Array
                (  
                    [0] => fixed
                    [1] => fixed
                )

            [answers] =>
            [isAnswer] =>
            [username] => poster
            [user_agent] =>
            [isReply] =>
            [threadsize] =>
        )
            [content_type_charset] => Array
                (  
                    [0] => utf-8
                    [1] => utf-8
                )

            [content_type_name] => Array
                (  
                    [0] => unnamed
                    [1] => unnamed
                )

            [content_type_boundary] => 6c1d302fc476b126c246d0fcfb5876bebc92ae72
            [content_type_format] => Array
                (  
                    [0] => fixed
                    [1] => fixed
                )

            [answers] =>
            [isAnswer] =>
            [username] => poster
            [user_agent] =>
            [isReply] =>
            [threadsize] =>
        )

    [body] => Array
        (  
            [0] => and another text

            [1] => ����^@^PJFIF^@^A^A^A^@H^@H^@^@��^@C^@^H^F^F^G^F^E^H^G^G^G            ^H
^L^T^M^L^K^K^L^Y^R^S^O^T^]^Z^_^^^]^Z^\^\ $.' ",#^\^\(7),01444^_'9=82<.342��^@C^A                        ^L^K^L^X^M^M^X2!^\!22222222222222222222222222222222222222222222222222��^@^Q^H^@�^@�^C^A"^@^B^Q^A^C^Q^A��^@^W^@^A^A^A^A^@^@^@^@^@^@^@^@$
        )

)

so i guess message_parse is just taking away the names when reading the message.

cheers

trw

--
Posted on def2


Subject: works with messages posted on def4
From: Anonymous
Newsgroups: rocksolid.programming
Organization: i2pn2 (i2pn.org)
Date: Wed, 10 Jun 2020 11:18 UTC
Path: i2pn2.org!.POSTED!not-for-mail
From: pos...@anon.com (Anonymous)
Newsgroups: rocksolid.programming
Subject: works with messages posted on def4
Date: Wed, 10 Jun 2020 04:18:58 -0700
Organization: i2pn2 (i2pn.org)
Message-ID: <code.257.2zxpar@anon.com>
References: <536716545ac3003ada9b38182d31871b$1@www.novabbs.com>
Content-Type: text/plain; charset=UTF-8
Injection-Info: i2pn2.org; posting-account="def2";
logging-data="5777"; mail-complaints-to="usenet@i2pn2.org"
View all headers
guess i could also change the way vichan composes the headers, that might be the better way.

vichan_message_read output for o post from def4:

messageType Object
(
    [header] => headerType Object
        (
            [number] =>
            [id] => <facc41f90179fdf2d0a9978da9c66d87@def4>
            [from] => anon@anon.com
            [name] => anon
            [subject] => Re: testing something with attachments
            [newsgroups] => rocksolid.shared.test
            [followup] =>
            [date] => 1591734630
            [date_thread] =>
            [organization] => def5
            [xnoarchive] =>
            [references] => Array
                (
                    [0] => <ts.1067.361szz@anon.com>
                )

            [bestreference] =>
            [content_transfer_encoding] => 8bit
            [mime_version] =>
            [content_type] => Array
                (
                    [0] => text/plain
                    [1] => image/jpeg
                )

            [content_type_charset] => Array
                (
                    [0] => utf-8
                    [1] => utf-8
                )

            [content_type_name] => Array
                (
                    [0] => unnamed
                    [1] => test.jpg
                )

            [content_type_boundary] => ------------2D7B91D89218F6D0182BBE7B
            [content_type_format] => Array
                (
                    [0] => fixed
                    [1] => fixed
                )

            [answers] =>
            [isAnswer] =>
            [username] => anon
            [user_agent] =>
            [isReply] =>
            [threadsize] =>
        )

    [body] => Array
        (
            [0] => something small again, from def4
:

--
Posted on def2


Subject: Re: i have been working on a similar problem
From: Retro Guy
Newsgroups: rocksolid.programming
Organization: Rocksolid Light
Date: Thu, 11 Jun 2020 08:22 UTC
Path: i2pn2.org!.POSTED!not-for-mail
From: Retro ...@rslight.i2p (Retro Guy)
Newsgroups: rocksolid.programming
Subject: Re: i have been working on a similar problem
Date: Thu, 11 Jun 2020 08:22 UTC
Organization: Rocksolid Light
Message-ID: <a0057d0744092957b392e5f9e89ec0d3$1@www.novabbs.com>
References: <536716545ac3003ada9b38182d31871b$1@www.novabbs.com> <code.255.1gecec@anon.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: i2pn2.org; posting-account="retrobbs1";
logging-data="11556"; mail-complaints-to="usenet@i2pn2.org"
User-Agent: Rocksolid Light (news.novabbs.com/getrslight)
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on novabbs.com
X-Rslight-Site: $2y$10$Tq0hpdOsNXV7Kmc8xZ8DNuA6L3hzXFL1zuH80Qlcezy.n.8nfGcvG
View all headers
Anonymous wrote:

and i think it is the newsportal code that swallows the name somewhere along the road. taking the next post (because it has a very small attachment), this is what you get from article # on telnet:

220 3428 <ts.1068.1410jn@anon.com> article
...

and another text
--6c1d302fc476b126c246d0fcfb5876bebc92ae72
Content-Disposition: form-data; filename="test.jpg"; name="attachment"
Content-Type: image/jpeg
Content-Transfer-Encoding: base64

Where do you think the "name" is getting lost? Is vichan producing the line with "name" in the Content-Type: header? I ask because rslight uses this process to post messages:

It sends them to the rslight nntp server, which inserts them in the spool (if spoolnews isn't currently running), and drops them in the ./outgoing directory, to be sent by send.php later, but isn't losing anything in that header.

If vichan is sending with a proper Conten-Type: header line, then we need to work that out. If it is, is the "name" portion on the same line as 'Content-Type: ', or the next line. If it's the next line, I can think of a way that it might get lost, but on the same line I can't think of a way.

If it is the next line, and it is creating it, and it is getting lost, I should be able to fix that.

Retro Guy

--
Posted on: Rocksolid Light
www.novabbs.com


Subject: Re: he, that is rich
From: Retro Guy
Newsgroups: rocksolid.programming
Organization: Rocksolid
Date: Thu, 11 Jun 2020 09:41 UTC
Path: i2pn2.org!.POSTED!not-for-mail
From: retro...@retrobbs.rocksolidbbs.com (Retro Guy)
Newsgroups: rocksolid.programming
Subject: Re: he, that is rich
Date: Thu, 11 Jun 2020 02:41:50 -0700
Organization: Rocksolid
Lines: 24
Message-ID: <aca512ba8c8093d285c3999a9ea711ae$1@rslight.i2p>
References: <536716545ac3003ada9b38182d31871b$1@www.novabbs.com> <code.256.3c2ebh@anon.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 7Bit
Injection-Info: i2pn2.org; posting-account="retrobbs1";
logging-data="23500"; mail-complaints-to="usenet@i2pn2.org"
User-Agent: KNode/4.14.1
View all headers
Anonymous wrote:

by putting the full message from telnet in the post (including the last
line with just the dot), the post was cut when it was posted to the news
server (that only reads until the first line with '.') lol. so here is the
rest of the post, that you can only read in full on def2 now (btw, this
should be a way to make local comments that are only visible on the node
where they are posted - a new feature):

and this is the array you get from vichan_message_read (which should be
the same as message_read as far as this is concerned):

so i guess message_parse is just taking away the names when reading the
message.

Just saw this. It's strange because I obviously use message parse. I guess
my question is the same as my other post, does vichan put 'name' on a second
line? Could you please post an outgoing header from vichan that contains
such an attachment?

I'd like to look at the header as that will help me to see where it might be
getting (modified/corrupted/changed).

Retro Guy



Subject: None
From: Anonymous
Newsgroups: rocksolid.programming
Organization: rocksolid2 (news.novabbs.com)
Date: Thu, 11 Jun 2020 09:38 UTC
Path: i2pn2.org!rocksolid2!.POSTED.127.215.126.48!not-for-mail
From: pos...@anon.com (Anonymous)
Newsgroups: rocksolid.programming
Subject: None
Date: Thu, 11 Jun 2020 02:38:11 -0700
Organization: rocksolid2 (news.novabbs.com)
Message-ID: <code.260.3bfnhs@anon.com>
References: <536716545ac3003ada9b38182d31871b$1@www.novabbs.com>
Content-Type: text/plain; charset=UTF-8
Injection-Info: novabbs.com; posting-account="def.i2p"; posting-host="127.215.126.48";
logging-data="14538"; mail-complaints-to="usenet@novabbs.com"
View all headers
this is what vichan gives to the news server:

Message-Id: <ts.1068.1410jn@anon.com>
Newsgroups: rocksolid.shared.test
Date: Tue, 09 Jun 2020 11:47:07 -0700
Subject: and something really small
From: Anonymous <poster@anon.com>
References: <ts.1067.361szz@anon.com>
Content-Type: multipart/mixed; boundary=6c1d302fc476b126c246d0fcfb5876bebc92ae72
Mime-Version: 1.0

--6c1d302fc476b126c246d0fcfb5876bebc92ae72
Content-Type: text/plain; charset=UTF-8

and another text
--6c1d302fc476b126c246d0fcfb5876bebc92ae72
Content-Disposition: form-data; filename="test.jpg"; name="attachment"
Content-Type: image/jpeg
Content-Transfer-Encoding: base64

/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCACIAIYDASIAAhEBAxEB/8QAFwABAQEBAAAAAAAAAAAAAAAAAAcIBv/EABYQAQEBAAAAAAAAAAAAAAAAAAAWF//EABUBAQEAAAAAAAAAAAAAAAAAAAAE/8QAGBEBAQADAAAAAAAAAAAAAAAAABRhYqH/2gAMAwEAAhEDEQA/AJGK5lRlS2zXqOXKRiuZUZUWa9JcpGK5lRlRZr0lykYrmVGVFmvSXKRiuZUZUWa9JcpGK5lRlRZr0lykYrmVGVFmvSXKRiuZUZUWa9JcpGK5lQWa9JcqAOfESx0A58B0A58B0A58B0A58B0A58B0A58B0A58B0A58ACVJUAJUlQAlSVACVJUAJUlQAlSVACVJUAJUlQAlQFAAAAAAAAAAAAAAAAAABz9UVTP9UVQNAVRVM/1RVA0BVFUz/VFUDQFUVTP9UVQNAVRVM/1RVA0BVFUz/VFUDQFUVTP9UVQNAVRVM/1RVA0BVDP9UAEq0BKkqDP8qSrQEqSoM/ypKtASpKgz/Kkq0BKkqDP8qSrQEqSoM/ypKtASpKgz/Kkq0BKkqDP8qSrQEqSoM/yo0BKgOgAAAAAAAAAAAAAAAAABH9VNVSMWx7cR1YVzVTVUjCPbhVhXNVNVSMI9uFWFc1U1VIwj24VYVzVTVUjCPbhVhXNVNVSMI9uFWFc1U1VIwj24VYVzVTVUjCPbhVhXNVEjCPbhVgAXJAAAAAAAAAAAAAAAAH/2Q==
--6c1d302fc476b126c246d0fcfb5876bebc92ae72--

at this stage you can see that the name is still in there. also on the news server the name is still there (see my first answer).
so i guess it is lost when the message is read with message_read (or vichan_message_read).

cheers

trw

--
Posted on def2


Subject: Re: Vichan header (w/attachment)
From: Retro Guy
Newsgroups: rocksolid.programming
Organization: RetroBBS
Date: Thu, 11 Jun 2020 09:49 UTC
Path: i2pn2.org!rocksolid3!.POSTED.localhost!not-for-mail
From: retro....@retrobbs.rocksolidbbs.com.remove-teg-this (Retro Guy)
Newsgroups: rocksolid.programming
Subject: Re: Vichan header (w/attachment)
Date: Thu, 11 Jun 2020 09:49:58 +0000
Organization: RetroBBS
Message-ID: <0c5edbd79b5161272e118c5eeccb5bdf$1@www.rocksolidbbs.com>
References: <code.260.3bfnhs@anon.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: rocksolidbbs.com; posting-host="localhost:127.0.0.1";
logging-data="13032"; mail-complaints-to="usenet@rocksolidbbs.com"
User-Agent: Rocksolid Light (news.novabbs.com/getrslight)
To: Anonymous
X-Comment-To: Anonymous
In-Reply-To: <code.260.3bfnhs@anon.com>
X-FTN-PID: Synchronet 3.17a-Linux Dec 29 2018 GCC 6.3.0
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on rocksolidbbs.com
X-Rslight-Site: $2y$10$VifWVG6l8QZPQmy7gP2Qy.YCJufMxNKxYAP7IZquKHpstgc9Ar.4u
X-Gateway: retrobbs.rocksolidbbs.com [Synchronet 3.17a-Linux NewsLink 1.110]
View all headers
  To: Anonymous
Anonymous wrote:

this is what vichan gives to the news server:

Message-Id: <ts.1068.1410jn@anon.com>
Newsgroups: rocksolid.shared.test
Date: Tue, 09 Jun 2020 11:47:07 -0700
Subject: and something really small
From: Anonymous <poster@anon.com>
References: <ts.1067.361szz@anon.com>
Content-Type: multipart/mixed; boundary=6c1d302fc476b126c246d0fcfb5876bebc92ae72
Mime-Version: 1.0

--6c1d302fc476b126c246d0fcfb5876bebc92ae72
Content-Type: text/plain; charset=UTF-8

and another text
--6c1d302fc476b126c246d0fcfb5876bebc92ae72
Content-Disposition: form-data; filename="test.jpg"; name="attachment"
Content-Type: image/jpeg
Content-Transfer-Encoding: base64

Very strange, because the 'name' is not there as I read this post. I see:

Content-Type: image/jpeg

no 'name' in that line.

Retro Guy

--
Posted on: RetroBBS
www.rocksolidbbs.com



Subject: the line before
From: Anonymous
Newsgroups: rocksolid.programming
Organization: rocksolid2 (news.novabbs.com)
Date: Thu, 11 Jun 2020 10:35 UTC
Path: i2pn2.org!rocksolid2!.POSTED.127.215.126.48!not-for-mail
From: pos...@anon.com (Anonymous)
Newsgroups: rocksolid.programming
Subject: the line before
Date: Thu, 11 Jun 2020 03:35:41 -0700
Organization: rocksolid2 (news.novabbs.com)
Message-ID: <code.265.2p39l0@anon.com>
References: <536716545ac3003ada9b38182d31871b$1@www.novabbs.com>
Content-Type: text/plain; charset=UTF-8
Injection-Info: novabbs.com; posting-account="def.i2p"; posting-host="127.215.126.48";
logging-data="25805"; mail-complaints-to="usenet@novabbs.com"
View all headers
no 'name' in that line.

it is in the line before. will it help if i put it into this line as well ?

--
Posted on def2


Subject: ok, bbs puts it in both lines
From: Anonymous
Newsgroups: rocksolid.programming
Organization: def2
Date: Thu, 11 Jun 2020 10:49 UTC
Path: i2pn2.org!.POSTED!not-for-mail
From: pos...@anon.com (Anonymous)
Newsgroups: rocksolid.programming
Subject: ok, bbs puts it in both lines
Date: Thu, 11 Jun 2020 03:49:03 -0700
Organization: def2
Message-ID: <code.266.2ala9u@anon.com>
References: <536716545ac3003ada9b38182d31871b$1@www.novabbs.com>
Content-Type: text/plain; charset=UTF-8
Injection-Info: i2pn2.org; posting-account="def2";
logging-data="1259"; mail-complaints-to="usenet@i2pn2.org"
View all headers
see the relevant part of the header here (posted on def4):

Content-Type: image/jpeg;
 name="test.jpg"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
 filename="test.jpg"

i can do the same with vichan, i guess. not sure if there is a right or a wrong way here (would have to read the rfc again :-) ), but this might be the fastest way.

--
Posted on def2


Subject: Re: ok, bbs puts it in both lines
From: Retro Guy
Newsgroups: rocksolid.programming
Organization: Rocksolid Light
Date: Thu, 11 Jun 2020 10:53 UTC
Path: i2pn2.org!.POSTED!not-for-mail
From: Retro ...@rslight.i2p (Retro Guy)
Newsgroups: rocksolid.programming
Subject: Re: ok, bbs puts it in both lines
Date: Thu, 11 Jun 2020 10:53 UTC
Organization: Rocksolid Light
Message-ID: <2e74c68a146b1edddf88774a3ddd20a1$1@www.novabbs.com>
References: <536716545ac3003ada9b38182d31871b$1@www.novabbs.com> <code.266.2ala9u@anon.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: i2pn2.org; posting-account="retrobbs1";
logging-data="2136"; mail-complaints-to="usenet@i2pn2.org"
User-Agent: Rocksolid Light (news.novabbs.com/getrslight)
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on novabbs.com
X-Rslight-Site: $2y$10$Wrn3erSTF5BhT/65MzUKfu8k8EmhaMu0sU4crOYTr4uCqZ1fMW2Lu
View all headers
Anonymous wrote:

see the relevant part of the header here (posted on def4):

Content-Type: image/jpeg;
 name="test.jpg"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
 filename="test.jpg"

i can do the same with vichan, i guess. not sure if there is a right or a wrong way here (would have to read the rfc again :-) ), but this might be the fastest way.

I've only tried to view in rslight and knode (kde newsreader), and neither displays a name unless it's in the Content-Type: header. So it's not just rslight, at least knode also. Both (rslight and knode) react the same way to the message.

Retro Guy

--
Posted on: Rocksolid Light
www.novabbs.com


Subject: ok, then it is settled
From: Anonymous
Newsgroups: rocksolid.programming
Organization: def5
Date: Thu, 11 Jun 2020 11:04 UTC
Path: i2pn2.org!i2pn.org!rocksolid2!def5!.POSTED.bogusentry!not-for-mail
From: pos...@anon.com (Anonymous)
Newsgroups: rocksolid.programming
Subject: ok, then it is settled
Date: Thu, 11 Jun 2020 04:04:17 -0700
Organization: def5
Message-ID: <code.268.3u18yy@anon.com>
References: <536716545ac3003ada9b38182d31871b$1@www.novabbs.com>
Content-Type: text/plain; charset=UTF-8
Injection-Info: def5.org; posting-host="bogusentry:192.168.1.189";
logging-data="13537"; mail-complaints-to="usenet@def5.org"
View all headers
i will change the vichan code for the posting.
have to do that anyway on the receiving end as well, handling attachments well is one of the harder parts.
glad that you solved the inline attachments problem.

cheers

trw

--
Posted on def2


Subject: Re: ok, bbs puts it in both lines
From: Retro Guy
Newsgroups: rocksolid.programming
Organization: Rocksolid Light
Date: Thu, 11 Jun 2020 11:12 UTC
Path: i2pn2.org!.POSTED!not-for-mail
From: Retro ...@rslight.i2p (Retro Guy)
Newsgroups: rocksolid.programming
Subject: Re: ok, bbs puts it in both lines
Date: Thu, 11 Jun 2020 11:12 UTC
Organization: Rocksolid Light
Message-ID: <844738e02a86cbb4b5e5f0416fd5c7b6$1@www.novabbs.com>
References: <536716545ac3003ada9b38182d31871b$1@www.novabbs.com> <code.266.2ala9u@anon.com> <2e74c68a146b1edddf88774a3ddd20a1$1@www.novabbs.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: i2pn2.org; posting-account="retrobbs1";
logging-data="5209"; mail-complaints-to="usenet@i2pn2.org"
User-Agent: Rocksolid Light (news.novabbs.com/getrslight)
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on novabbs.com
X-Spam-Level: *
X-Rslight-Site: $2y$10$xwSAFya//rXvwtqTtigl6uLpHOAKI5/HlAL3zk0TfMQdKSHxlP9ii
View all headers
Retro Guy wrote:

Anonymous wrote:

see the relevant part of the header here (posted on def4):

Content-Type: image/jpeg;
 name="test.jpg"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
 filename="test.jpg"

i can do the same with vichan, i guess. not sure if there is a right or a wrong way here (would have to read the rfc again :-) ), but this might be the fastest way.

I've only tried to view in rslight and knode (kde newsreader), and neither displays a name unless it's in the Content-Type: header. So it's not just rslight, at least knode also. Both (rslight and knode) react the same way to the message.

I read this:

In 1996 RFC2045 re-defined the Content-Type header but this time there was no explicit “name” parameter mentioned. In 1997 RFC2183 fixed this by adding a new header Content-Disposition that has a parameter called filename, suitable for, as the name suggests, defining attachment filenames.

So apparently the name was moved from one header to another. This can cause new and old software to react differently. From what I see, having it in both places does not conflict with the RFC (it doesn't say 'NO'), and will work in more clients. My view would be to have it in both headers if you are willing.

Retro Guy



--
Posted on: Rocksolid Light
www.novabbs.com


Subject: yeah sure
From: Anonymous
Newsgroups: rocksolid.programming
Organization: Rocksolid Light
Date: Thu, 11 Jun 2020 11:22 UTC
Path: i2pn2.org!.POSTED!not-for-mail
From: pos...@anon.com (Anonymous)
Newsgroups: rocksolid.programming
Subject: yeah sure
Date: Thu, 11 Jun 2020 04:22:37 -0700
Organization: Rocksolid Light
Message-ID: <code.270.1i6w34@anon.com>
References: <536716545ac3003ada9b38182d31871b$1@www.novabbs.com>
Content-Type: text/plain; charset=UTF-8
Injection-Info: i2pn2.org; posting-account="retrobbs1";
logging-data="6408"; mail-complaints-to="usenet@i2pn2.org"
View all headers
My view would be to have it in both headers if you are willing.

you are preachin' to the choir. and i was convinced even before you quoted the RFC. :-)

--
Posted on def2


Subject: ok fixed
From: Anonymous
Newsgroups: rocksolid.programming
Organization: def5
Date: Sat, 13 Jun 2020 13:00 UTC
Path: i2pn2.org!i2pn.org!rocksolid2!def5!.POSTED.bogusentry!not-for-mail
From: pos...@anon.com (Anonymous)
Newsgroups: rocksolid.programming
Subject: ok fixed
Date: Sat, 13 Jun 2020 06:00:30 -0700
Organization: def5
Message-ID: <code.278.2ngefm@anon.com>
References: <536716545ac3003ada9b38182d31871b$1@www.novabbs.com>
Content-Type: text/plain; charset=UTF-8
Injection-Info: def5.org; posting-host="bogusentry:192.168.1.189";
logging-data="28970"; mail-complaints-to="usenet@def5.org"
View all headers
the attachments name shows up now on rslight.

cheers

trw

--
Posted on def2


Subject: Re: ok fixed
From: Retro Guy
Newsgroups: rocksolid.programming
Organization: Rocksolid Light
Date: Sat, 13 Jun 2020 22:06 UTC
Path: i2pn2.org!.POSTED!not-for-mail
From: Retro ...@rslight.i2p (Retro Guy)
Newsgroups: rocksolid.programming
Subject: Re: ok fixed
Date: Sat, 13 Jun 2020 22:06 UTC
Organization: Rocksolid Light
Message-ID: <a8bd8c6f0d015a6076badaa14d372912$1@www.novabbs.com>
References: <536716545ac3003ada9b38182d31871b$1@www.novabbs.com> <code.278.2ngefm@anon.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: i2pn2.org; posting-account="retrobbs1";
logging-data="7903"; mail-complaints-to="usenet@i2pn2.org"
User-Agent: Rocksolid Light (news.novabbs.com/getrslight)
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on novabbs.com
X-Rslight-Site: $2y$10$h3u5ANNSTqRIEh4o7sq3zegxDHdgorjUUJPqpbXet4r7TI7.UQ9m6
View all headers
Anonymous wrote:

the attachments name shows up now on rslight.

Looks good, just saw the test message.

There is still a minor issue that I'm not sure is really an issue, but I'd like to change (improve) it. It's the same on rslight, so not vichan specific:

Once an inline attachment is reached, the attachment is handled, but no text after that attachment is displayed. It stops at that point. That's why you see no footer on posts with inline attachments.

I know how to fix this, I just haven't had time to work on it yet.

Retro Guy



--
Posted on: Rocksolid Light
www.novabbs.com


Subject: Re: ok fixed
From: anon
Newsgroups: rocksolid.programming
Organization: def5
Date: Sun, 14 Jun 2020 01:30 UTC
Path: i2pn2.org!rocksolid2!def5!POSTED.localhost!not-for-mail
From: ano...@anon.com (anon)
Newsgroups: rocksolid.programming
Message-ID: <ec24cc9c6093a7e99fcba59125205eec@def4>
Subject: Re: ok fixed
Date: Sun, 14 Jun 2020 01:30:59+0000
Organization: def5
In-Reply-To: <a8bd8c6f0d015a6076badaa14d372912$1@www.novabbs.com>
References: <a8bd8c6f0d015a6076badaa14d372912$1@www.novabbs.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
View all headers

Once an inline attachment is reached, the attachment is handled, but no text after that attachment is displayed.

I guess that is handled in message_parse, then ?
Happy bug hunting. :-)

cheers

trw

ps: inline attachments are a pest, and if i would have the time i would fix this in fudforum. since i don't, good to know you are on it.

Posted on def4


Subject: Re: ok fixed
From: Retro Guy
Newsgroups: rocksolid.programming
Organization: Rocksolid Light
Date: Sun, 14 Jun 2020 06:22 UTC
Path: i2pn2.org!.POSTED!not-for-mail
From: Retro ...@rslight.i2p (Retro Guy)
Newsgroups: rocksolid.programming
Subject: Re: ok fixed
Date: Sun, 14 Jun 2020 06:22 UTC
Organization: Rocksolid Light
Message-ID: <12d3324b1b06037192122d6c94d9f7fd$1@www.novabbs.com>
References: <a8bd8c6f0d015a6076badaa14d372912$1@www.novabbs.com> <ec24cc9c6093a7e99fcba59125205eec@def4>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: i2pn2.org; posting-account="retrobbs1";
logging-data="29711"; mail-complaints-to="usenet@i2pn2.org"
User-Agent: Rocksolid Light (news.novabbs.com/getrslight)
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on novabbs.com
X-Rslight-Site: $2y$10$wwCBVcqolF20akKbeBbhiuRudA6RIJvTeLH55K2lgJwAmiUo9bu5.
View all headers
anon wrote:


Once an inline attachment is reached, the attachment is handled, but no text after that attachment is displayed.

I guess that is handled in message_parse, then ?

Yes, that's the place. I just tested my mods and it seems to be working fine. It was working before, but it's better now. It will display text after an attachment, and also not think it has an attachment if it does not (it checks that something is really there).

Originally, there was a bug in newsportal that if it saw a line in a post that started with 'begin', it would just loop forever looking for 'end'. I'm assuming the author just hadn't finished testing. This would cause rslight to timeout on such messages, so I just disabled the code.

Now I have replaced the code, and check for this stuff. I've tried to break it (I'm sure there are ways to do that ;) but it seems fairly stable now.

I suggest you try it out on rslight.i2p to see if you are happy with it before merging it into your code. I'll put 'message.inc.php.txt' in the download area in a few minutes.

ps: inline attachments are a pest, and if i would have the time i would fix this in fudforum. since i don't, good to know you are on it.

I don't miss fudforum, lol :)

Retro Guy

--
Posted on: Rocksolid Light
www.novabbs.com


Subject: newsportal code
From: Anonymous
Newsgroups: rocksolid.programming
Organization: i2pn2 (i2pn.org)
Date: Sun, 14 Jun 2020 11:29 UTC
Path: i2pn2.org!.POSTED!not-for-mail
From: pos...@anon.com (Anonymous)
Newsgroups: rocksolid.programming
Subject: newsportal code
Date: Sun, 14 Jun 2020 04:29:44 -0700
Organization: i2pn2 (i2pn.org)
Message-ID: <code.430.1t4lmb@anon.com>
References: <536716545ac3003ada9b38182d31871b$1@www.novabbs.com>
Content-Type: text/plain; charset=UTF-8
Injection-Info: i2pn2.org; posting-account="def2";
logging-data="6902"; mail-complaints-to="usenet@i2pn2.org"
View all headers
and also not think it has an attachment if it does not (it checks that something is really there).

this caused the sync routine for vichan to hang on several messages (older ones from /ts), where there was a mime attachment announced, but then wasn't there.

Originally, there was a bug in newsportal that if it saw a line in a post that started with 'begin', it would just loop forever looking for 'end'.

This did not cause any problems for me yet, it is just that the inline content is displayed as text.

it will take me a while to try out your new code.

cheers

trw

--
Posted on def2


Subject: Re: newsportal code
From: Retro Guy
Newsgroups: rocksolid.programming
Organization: RetroBBS
Date: Mon, 15 Jun 2020 08:54 UTC
Path: i2pn2.org!rocksolid3!.POSTED.localhost!not-for-mail
From: retro....@retrobbs.rocksolidbbs.com.remove-3rr-this (Retro Guy)
Newsgroups: rocksolid.programming
Subject: Re: newsportal code
Date: Mon, 15 Jun 2020 08:54:08 +0000
Organization: RetroBBS
Message-ID: <25b145458efe010770c0f0dba6b171ee$1@www.rocksolidbbs.com>
References: <code.430.1t4lmb@anon.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: rocksolidbbs.com; posting-host="localhost:127.0.0.1";
logging-data="22306"; mail-complaints-to="usenet@rocksolidbbs.com"
User-Agent: Rocksolid Light (news.novabbs.com/getrslight)
To: Anonymous
X-Comment-To: Anonymous
In-Reply-To: <code.430.1t4lmb@anon.com>
X-FTN-PID: Synchronet 3.17a-Linux Dec 29 2018 GCC 6.3.0
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on rocksolidbbs.com
X-Rslight-Site: $2y$10$XDniV8sEBOY4nLsmMvQnS.yoW8APENj5Hg7rqzw.G9dui.d.k8y7q
X-Gateway: retrobbs.rocksolidbbs.com [Synchronet 3.17a-Linux NewsLink 1.110]
View all headers
  To: Anonymous
Anonymous wrote:

and also not think it has an attachment if it does not (it checks that something is really there).

this caused the sync routine for vichan to hang on several messages (older ones from /ts), where there was a mime attachment announced, but then wasn't there.

This hopefully is solved in the latest file. You can see in rslight when an attachment is announced, but doesn't really exist (it says 'Attachments: (text/plain)', but nothing to click on. Once I finished the mod, this isn't happening as no attachment is announced.

Retro Guy

--
Posted on: RetroBBS
www.rocksolidbbs.com



Subject: Re: newsportal code
From: Retro Guy
Newsgroups: rocksolid.programming
Organization: rslight Debian test site
Date: Mon, 15 Jun 2020 10:58 UTC
Path: i2pn2.org!.POSTED!not-for-mail
From: Retro ...@example.com (Retro Guy)
Newsgroups: rocksolid.programming
Subject: Re: newsportal code
Date: Mon, 15 Jun 2020 10:58 UTC
Organization: rslight Debian test site
Message-ID: <8669527f6d921bf899d980a3d292593c$1@192.168.0.220>
References: <code.430.1t4lmb@anon.com> <25b145458efe010770c0f0dba6b171ee$1@www.rocksolidbbs.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: i2pn2.org; posting-account="retrobbs1";
logging-data="3864"; mail-complaints-to="usenet@i2pn2.org"
User-Agent: Rocksolid Light (news.novabbs.com/getrslight)
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on i2pwall.i2p
X-Rslight-Site: $2y$10$Xprx1qKZIEv/ZzIfVYVH0.3ApTS3oOa3KBLM3WC1uFyP4OCEeF88i
View all headers
Retro Guy wrote:

  To: Anonymous
Anonymous wrote:

and also not think it has an attachment if it does not (it checks that something is really there).

this caused the sync routine for vichan to hang on several messages (older ones from /ts), where there was a mime attachment announced, but then wasn't there.

This hopefully is solved in the latest file. You can see in rslight when an attachment is announced, but doesn't really exist (it says 'Attachments: (text/plain)', but nothing to click on. Once I finished the mod, this isn't happening as no attachment is announced.

I've just made a minor change in message_parse that may be of interest to you. Note: I have uploaded the new message.inc.php.txt to my download site.

rslight checks attachment mime-type by checking the actual file, not depending on the file extension (this is safer), but was not doing that for inline attachments. This mod changes from checking file extension to checking the file itself.

The latest file available for download contains this change, but you must add the below function for it to call. I don't put it in the file because I have it in newsportal.php, but you'll need it in your script so you can use it:

function get_mimetype_by_string($filedata) {
  $f = finfo_open();
  return finfo_buffer($f, $filedata, FILEINFO_MIME_TYPE);
}

This simply receives the uudecoded data, and returns the mimetype. You really want to be displaying to users the accurate mime-type, not just based on whatever extension the file has.

Retro Guy



--
Posted on: rslight Debian test site
192.168.0.220


1
rocksolid light 0.7.0
clearneti2ptor