Rating:

1. Challenges uses a custom 'serializing' algorithm.
2. Stores length of array/string in a single byte, length allowed <= 256.
3. 256 in a single byte = 0.
4. Enter email of size = 256, during storage it would be treated as '0' byte and the email string would be used to parse other fields.
5. Forge a credentials array inside email.
6. Register with this email and simply login to get the flag

Original writeup (https://github.com/DhavalKapil/ctf-writeups/blob/master/codegate-2018/rbSql/exploit.php).