Rocksolid Light

Welcome to Rocksolid Light

register   nodelist   faq  


rocksolid / rocksolid.programming / Re: i have been working on a similar problem

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

Subject: vichan outgoing attachments (2)
From: Retro Guy@rslight.i2p (Retro Guy)
Newsgroups: rocksolid.programming
Organization: Rocksolid Light
Date: Wed, 10 Jun 2020 03:59 UTC
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: poster@anon.com (Anonymous)
Newsgroups: rocksolid.programming
Organization: def5
Date: Wed, 10 Jun 2020 10:01 UTC
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: poster@anon.com (Anonymous)
Newsgroups: rocksolid.programming
Organization: def5
Date: Wed, 10 Jun 2020 10:48 UTC
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: poster@anon.com (Anonymous)
Newsgroups: rocksolid.programming
Organization: i2pn2 (i2pn.org)
Date: Wed, 10 Jun 2020 11:18 UTC
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@rslight.i2p (Retro Guy)
Newsgroups: rocksolid.programming
Organization: Rocksolid Light
Date: Thu, 11 Jun 2020 08:22 UTC
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: retroguy@retrobbs.rocksolidbbs.com (Retro Guy)
Newsgroups: rocksolid.programming
Organization: Rocksolid
Date: Thu, 11 Jun 2020 09:41 UTC
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: poster@anon.com (Anonymous)
Newsgroups: rocksolid.programming
Organization: rocksolid2 (news.novabbs.com)
Date: Thu, 11 Jun 2020 09:38 UTC
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@retrobbs.rocksolidbbs.com.remove-teg-this (Retro Guy)
Newsgroups: rocksolid.programming
Organization: RetroBBS
Date: Thu, 11 Jun 2020 09:49 UTC
  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: poster@anon.com (Anonymous)
Newsgroups: rocksolid.programming
Organization: rocksolid2 (news.novabbs.com)
Date: Thu, 11 Jun 2020 10:35 UTC
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: poster@anon.com (Anonymous)
Newsgroups: rocksolid.programming
Organization: def2
Date: Thu, 11 Jun 2020 10:49 UTC
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


Pages:123
rocksolid light 0.6.5e
clearnet i2p tor