Three defects in add/time_limited_alias:
The description was read as $_data['description'] without a guard. When a
client omits it, null is bound to spamalias.description, which is TEXT NOT
NULL, so the insert raises a PDOException. The global exception handler is
terminal, so process_add_return() never echoes anything and the caller sees
HTTP 200 with an empty body while no alias was created. Default it to an
empty string instead.
The validity guard used a single condition whose else branch also caught the
success case, so every valid validity was overwritten with the 8760 hour
default and the parameter did nothing. Only invalid values were rejected.
Nest the range check so a valid value survives.
The OpenAPI spec documented only username and domain, while the code also
reads description, validity and permanent. Spec driven clients therefore
could not construct a working request. Document all three.
spamalias.description is the only NOT NULL description column in the schema,
which is why the same unguarded read in add/domain and add/resource does not
fail, both of those columns are nullable.
This does not change the generic exception handling. A database error is
still swallowed into an empty HTTP 200, and the message the handler builds
carries the raw PDOException, so surfacing it to API clients would need
sanitising first. That is left for a separate change.
Refs #7287
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* Allow making spam aliases permanent
* added german translation
* updated Spamalias Twig + Rename in Spam Alias
* compose: update image tags to align to vendor version
---------
Co-authored-by: DerLinkman <niklas.meyer@servercow.de>
* fts-flatcurve: inital implementation
* fts: removed solr from compose.yml
* flatcurve: added heap and proc logic to dovecot
* added logic for update.sh & generate for Flatcurve
* delete old iteration of fts-flatcurve.conf
* updated default fts.conf
* updated .gitignore to exclude fts.conf for further git updates
* Remove autogeneration of fts.conf (disable override)
* cleanup all left solr stuff
* renamed SKIP_FLATCURVE to SKIP_FTS
* cleanup leftovers solr in lang files
* moved lazy_expunge plugin only to mail_plugins
* added fts timeout value
* compose: remove dev image of dovecot
* updated japanese translation