proftpd / proftpd

ProFTPD source code
http://www.proftpd.org
GNU General Public License v2.0
529 stars 200 forks source link

Directory section, syntax error #1846

Open roboneci opened 1 week ago

roboneci commented 1 week ago

Hello, we have two servers RHEL7 and RHEL8. If i create configuration for Directory like that:

<Directory /home/example>

</Directory /home/example>

on RHEL7 and proftpd version from EPEL7 (proftpd-1.3.5e-12.el7.x86_64) proftpd -t doesn't show any errors.

on RHEL8 and proftpd version from EPEL8 (proftpd-1.3.6e-8.el8.x86_64) proftpd -t throw errors:

fatal: </Directory>: wrong number of parameters on line xx of '/etc/proftpd/path/to/config'
warning: unable to include '/etc/proftpd/path/to/config': Operation not permitted
fatal: error processing configuration file '/etc/proftpd.conf': unclosed configuration section.

I understand that syntax is wrong, but i don't understand why rhel7 version doesn't have any issue with such configuration and rhel8 version have.

Castaglia commented 1 week ago

This change in behavior came from https://github.com/proftpd/proftpd/commit/1e19610b6f470114265223af5178b744b2de4928

In particular, the CHECK_ARGS macro was allowing for zero or more parameters, but the intent had been to only allow zero parameters. The commit above changed the behavior to indeed be more strict, and enforce the proper expectation of a </Directory> closing line, without any parameters.