uncovery / uncovery_me

Full source of the uncovery.me minecraft server
GNU General Public License v3.0
12 stars 3 forks source link

Home names sanitised #259

Closed ETcodehome closed 7 years ago

ETcodehome commented 7 years ago

Home names checked using regex to ensure within desired ranges. Logic check for changes done by comparing sanitised string to raw input, if they don't match, error thrown as requested.

ETcodehome commented 7 years ago

Solves #249

uncovery commented 7 years ago

Looks good, but please do not use CAPS in variables. Could you fix that? (i.e. use $sanitized_name instead of $sanitized_Name).

The rule of thumb is to stick with the existing variable name conventions. Further, the CAPS in names are used to prevent underscores (e.g. $sanitizedNames), using both underscores and CAPS is a bit of overkill :D

ETcodehome commented 7 years ago

no worries. sorted.

uncovery commented 7 years ago

thanks! Re-introduced the trim() and put it live on the server now.

ETcodehome commented 7 years ago

You know the trim becomes extraneous right? The reg expression removes all the spaces.

From: Uncovery [mailto:notifications@github.com] Sent: Wednesday, 1 March 2017 4:55 PM To: uncovery/uncovery_me Cc: psiber-on-uncovery; Author Subject: Re: [uncovery/uncovery_me] Home names sanitised (#259)

thanks! Re-introduced the trim() and put it live on the server now.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/uncovery/uncovery_me/pull/259#issuecomment-283281646, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AP0omL9hlo70kuxYgwhtXevfH_VljzPlks5rhTJegaJpZM4MObxi.

uncovery commented 7 years ago

The argument from the command might include a space at the end that the user did not even mean to put there. I don't want the regex to fail because of that and rather pretend that it's not there and remove it.