Sanitize quota

Backport to stable45 of #2060