INTERACT FORUM
More => Old Versions => JRiver Media Center 27 for Windows => Topic started by: DrKNo on August 06, 2020, 12:16:26 pm
-
Sorry about making another post in short succession, but this one might be critical. The following query quietly erases the date field from the jriver instance:
http://127.0.0.1:52199/MCWS/v1/File/SetInfo?File=511&FileType=Key&Field=Date&Value=%2242380%22
Probably because the date is needlessly escaped with %22. I feel like this call should have no effect on the database or at least throw an error.
-
That has a value of "42380" going into the set. Setting the date to that is non-sense, so it empties.
Try "8/6/2020" or something that's an actual date.
-
Its an unformatted timestamp. Sending it without the quotes works fine.
Either way, "Doesn't parse, delete" seems dangerous to me? Shouldn't this result in a cancelled operation?
I don't depend on this change by the way, my code works fine thanks to your input. Just seemed dangerous to me.
Specifically, this url works for me:
http://127.0.0.1:52199/MCWS/v1/File/SetInfo?File=511&FileType=Key&Field=Date&Value=42400
Sorry, I only finally got your intention. Yes, of course the string content is nonsense. But deleting the value still seems dangerous to me
-
Alright, I'll make the next build of v26 have this change:
Changed: Passing an invalid date to the SetInfo call will return <Response Status="Failure"/> instead of setting an empty date.
-
Thank you, Matt! Much appreciated, as always.