Skip to content

Instantly share code, notes, and snippets.

@joebordes
Created February 13, 2017 22:35
Show Gist options
  • Save joebordes/4fb34e75618482c8570368e8c22c0e3f to your computer and use it in GitHub Desktop.
Save joebordes/4fb34e75618482c8570368e8c22c0e3f to your computer and use it in GitHub Desktop.
Validation: Quote in account name not permitted
diff --git a/modules/Accounts/AccountsValidation.php b/modules/Accounts/AccountsValidation.php
index edc6a9f..7377ebb 100644
--- a/modules/Accounts/AccountsValidation.php
+++ b/modules/Accounts/AccountsValidation.php
@@ -44,4 +44,8 @@ if ($blockDuplicateAccounts and isset($screen_values['accountname'])) {
die;
}
}
+if (isset($screen_values['accountname']) and strpos($screen_values['accountname'], '"')!==false) {
+ echo "Sorry, but quotes are not permitted in the account name.";
+ die();
+}
echo '%%%OK%%%';
\ No newline at end of file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment