1. Using fiverr for code and expecting something secure/competent
2. ChatGPT just used the most common security pattern, which is to check the input to a program. You could have found the same thing with a security linter
3. What are you going back & forth with the fiverr developer on? Just add in a sanitizer and move on. Presumably you used fiverr to sacrifice on quality in order to save time