kburtch / SparForte

Bourne shell, template engine, scripting language reliable, scalable projects. Based a ISO standard proven effective for large, mission-critical projects, SparForte is designed for fast development while, at the same time, providing easier designing, maintenance and bug removal. About 130.000 lines of code.
https://www.sparforte.com
GNU General Public License v2.0
50 stars 6 forks source link

SMTP Content Sanitation #2

Closed AdaDoom3 closed 10 years ago

AdaDoom3 commented 10 years ago

In pegasock-smtp.email the content string does not get sanitized correctly. Any line in content that starts with a period should be made to start with a double period to "escape" it. https://github.com/kburtch/SparForte/blob/master/src/pegasock/pegasock-smtp.adb

put_line( mysmtp.socket, content );
put_line( mysmtp.socket, "." );

Also, the date is not sent but with GNAT.Calendar.Time IO it should be pretty simple

Image(Clock, "%a, %d %b %Y %T -0500")
kburtch commented 10 years ago

Patched but fix not tested.