This makes the IsReservedName() call work better as it currently will ONLY match exact...
Which means if you have a ReservedName of [ admin ] , only attempts at using ( admin )
will flag it, any other values like: (Admin , ADMIN, aDmin, etc.. ) will not flag up with current implementation..
bool IsReservedName(const std::string& name) const
{
std::string tempStr;
tempStr.assign(name);
std::transform(tempStr.begin(), tempStr.end(), tempStr.begin(), tolower);
return m_ReservedNames.find(tempStr) != m_ReservedNames.end();
}
Really a simple fix, convert em all to LowerCase, and ONLY enter values in the DB in lowercase
Thus ANY attempt to use a ReservedName is caught...
Sheesh
Of course you could always get really fancy and do a Comparision with it checking if the ReservedName
is Within the name being checked, thus MrAdmin would flag on [ admin ] as being reserved...
I'll leave that excersise to you to work out :cool: