Skip to content

Commit

Permalink
Trim spaces and tabs from input (#222)
Browse files Browse the repository at this point in the history
  • Loading branch information
Seadragon91 committed Mar 22, 2020
1 parent 008bf50 commit 4e42a07
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions web_permissions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ local function ShowAddGroupPage(a_Request)
end

-- Add the group:
cRankManager:AddGroup(GroupName)
cRankManager:AddGroup(TrimString(GroupName))

-- Redirect the user:
return "<p>Group created. <a href='/" .. a_Request.Path .. "'>Return to group list</a>.</p>"
Expand All @@ -122,7 +122,7 @@ local function ShowAddPermissionPage(a_Request)
end

-- Add the permission:
cRankManager:AddPermissionToGroup(Permission, GroupName)
cRankManager:AddPermissionToGroup(TrimString(Permission), GroupName)

-- Redirect the user:
return
Expand All @@ -148,7 +148,7 @@ local function ShowAddRestrictionPage(a_Request)
end

-- Add the permission:
cRankManager:AddRestrictionToGroup(Restriction, GroupName)
cRankManager:AddRestrictionToGroup(TrimString(Restriction), GroupName)

-- Redirect the user:
return
Expand Down

0 comments on commit 4e42a07

Please sign in to comment.