BridgesUNCC / bridges-java

JAVA Client library for Bridges
http://bridgesuncc.github.io
GNU General Public License v2.0
4 stars 12 forks source link

Some assignment titles break assignment.upload #111

Closed squeetus closed 5 years ago

squeetus commented 6 years ago

Some assignment titles break assignment.upload, causing the assignment post/save process to fail.

To replicate, try creating an assignment title with '^_' in it. To fix on the server side, we will use try/catch rather than trusting the values sent from the client.

However, it might make more sense to trap these types of issues on the client side. We already restrict titles to certain lengths, so we should use a regex to either remove unwanted characters or report an error to the user to modify their title.

esaule commented 6 years ago

Why is this a problem on the server side? Is there a problem in the JSON parsing server side?

squeetus commented 5 years ago

This is addressed here https://github.com/krs-world/bridges/commit/766bfdb7bb1e0d96055dde863aa94d500b165219.

May need to be addressed in Python and C++ versions.

esaule commented 5 years ago

FYI, the C++ client should have all primary concrete types and strings and char* wrapped in a call to JSONencode which should take are of that kind of problems. Not sure for the python client.