I suspect I am going to feel really stupid after posting this but here goes. I have two main questions:
1) What is an appropriate regex to use for the registration id? Currently I have the following but I have not been able to find any docs to support whether this is sufficient:
'/^[a-z0-9_-]{40,255}$/i'
2) Is it "valid" for a regID to contain "--"? I know that android can't go worrying about what every language - in this case mysql - uses for comments, etc. but this caught me a little off guard. Up to this point I had always flagged that in my sanitizer(s) because of the possibility of being used for sql injection.
mysqli_prepare()
ormysqli_real_escape_string()
for your MySQL statements to avoid SQL injection. Personally I prefermysqli_prepare()
overmysqli_real_escape_string()
. – Pernod