Skip to content

Commit

Permalink
Merge pull request #409 from Quenty/users/jonnen/datastoresec
Browse files Browse the repository at this point in the history
fix: Fix actual code for data store match
  • Loading branch information
Quenty authored Sep 7, 2023
2 parents 8647a24 + ed39424 commit ffae9fa
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/datastore/src/Shared/Utility/DataStoreStringUtils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,12 @@ function DataStoreStringUtils.isValidUTF8(str)
return false, "Not a string"
end

if not utf8.len(str) then
return false, "Invalid string"
end

-- https://gist.github.com/TheGreatSageEqualToHeaven/e0e1dc2698307c93f6013b9825705899#patch-1
if string.match(input, "[^\0-\127]") then
if string.match(str, "[^\0-\127]") then
return false, "Invalid string"
end

Expand Down

0 comments on commit ffae9fa

Please sign in to comment.