Browse Source

Use ^ and $ anchors in whitelist.sh regex

Zander Hill 4 years ago
parent
commit
25da2a171f
No account linked to committer's email address
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      bin/whitelist.sh

+ 1
- 1
bin/whitelist.sh View File

@@ -19,7 +19,7 @@ function add_whitelist_to_git(){
19 19
 }
20 20
 
21 21
 function main(){
22
-  if [[ $(grep -i -e "$USERNAME" whitelist.txt ) ]];then
22
+  if [[ $(grep -i -e "^$USERNAME$" whitelist.txt ) ]];then
23 23
     user_exists_warning
24 24
   else
25 25
     add_user_to_whitelist