You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Mail::Sendmail.shellquote escapes characters like Shellwords.escape, but then also wraps the argument in double quotes. This causes incorrect values to be passed to sendmail/exim.
require 'mail'
require 'shellwords'
address = 'test~@example.com'
system "echo #{Shellwords.escape address}"
system "echo #{Mail::Sendmail.shellquote address}"
Outputs:
test~@example.com
test\~@example.com
The text was updated successfully, but these errors were encountered:
Mail::Sendmail.shellquote
escapes characters likeShellwords.escape
, but then also wraps the argument in double quotes. This causes incorrect values to be passed to sendmail/exim.Outputs:
The text was updated successfully, but these errors were encountered: