diaspora-federation icon indicating copy to clipboard operation
diaspora-federation copied to clipboard

Data validation is too brute

Open dimaursu opened this issue 10 years ago • 1 comments

https://github.com/Raven24/diaspora-federation/blob/master/lib/diaspora-federation/salmon/encrypted_slap.rb#L115

This is kinda harsh for developers, requiring to have author_id of type string. We can convert that on our own, with a simple .to_s ; I think it's more important to check if all the content of author_id are digits.

dimaursu avatar Jan 23 '15 21:01 dimaursu

yeah, you're probably right... that's one of my java-isms when I don't remember ruby supports duck typing ;)

Raven24 avatar Jan 24 '15 12:01 Raven24