In DB.StoreNetwork
.
Also validate them, e.g. don't allow spaces in them.
fa16337d97f9 ("Switch DB API to user IDs") ensures two networks don't have the same custom name. This isn't enough: a custom network name could match an auto network name, or two auto network names could match.