You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by gb...@apache.org on 2026/10/27 08:19:06 UTC

svn commit: r1939513 - spamassassin/trunk/spamd

Author: gbechis
Date: Tue Oct 27 08:19:06 2026
New Revision: 1939513

Log:
reject invalid user names

Modified:
   spamassassin/trunk/spamd/spamd.raw

Modified: spamassassin/trunk/spamd/spamd.raw
==============================================================================
--- spamassassin/trunk/spamd/spamd.raw	Tue Oct 27 08:16:25 2026	(r1939512)
+++ spamassassin/trunk/spamd/spamd.raw	Tue Oct 27 08:19:06 2026	(r1939513)
@@ -2783,6 +2783,14 @@ sub handle_virtual_config_dir {
     my $domain    = '';
     if ( $safename =~ /^(.*)\@(.*)$/ ) { $localpart = $1; $domain = $2; }
 
+    foreach my $part ($safename, $localpart, $domain) {
+      if ( $part =~ /^\./ ) {
+        info("spamd: refusing invalid username for virtual config dir: '$username'");
+        $spamtest->signal_user_changed( { username => $username, user_dir => undef } );
+        return 1;
+      }
+    }
+
     # Do userdir lookup exim-style. 
     # If a config for the full address exists, use that one
     # else look for a domain default