n1k0 / wordlem

A simplistic port of the popular Wordle game in Elm.
https://n1k0.github.io/wordlem
Do What The F*ck You Want To Public License
17 stars 4 forks source link

Avoid leaking the solution when provided with a word that is not part of the dictionary #3

Closed David-5-1 closed 2 years ago

David-5-1 commented 2 years ago

Despite my lack of knowledge of elm, I suggest changing

https://github.com/n1k0/wordlem/blob/9bba38b172df70c9b9c53a9f6d00a5a8dfbc9db1/src/Main.elm#L225 with

-        I18n.AbsentFromDictionary { word = word } |> translate lang |> Err
+        I18n.AbsentFromDictionary { word = input } |> translate lang |> Err
n1k0 commented 2 years ago

Muhahahaha good catch 😭 🤣

n1k0 commented 2 years ago

Fixed by https://github.com/n1k0/wordlem/commit/f7191174c73de154f010f9732f9fcde0c7db8557