rabbibotton / clog

CLOG - The Common Lisp Omnificent GUI
Other
1.53k stars 106 forks source link

Avoiding id and post-data collision for "multipart/form-data;" #207

Closed shakatoday closed 2 years ago

shakatoday commented 2 years ago

https://github.com/rabbibotton/clog/blob/91b229133dcc7e69cf1e8d2e0344067d47c3575f/source/clog-connection.lisp#L449-L455 When users access the application in the same second, get-universal-time generates the same id and post-data here. It means id and post-data collision.

I thought it was just about substituting get-universal-time with random-hex-string, but post-data here uses the same value. Thus, my judgement is it could be not so trivial to solve the collision.

rabbibotton commented 2 years ago

I changed to using random-hex-string and adjusted clog:form-multipart-data so would work.

shakatoday commented 2 years ago

Thank you for the patch. Found a tiny related code to modify as well.

208

Thanks again.