go-macaron / session

Package session is a middleware that provides the session management of Macaron.
Apache License 2.0
26 stars 27 forks source link

race condition in FileStore #7

Closed woodsaj closed 9 years ago

woodsaj commented 9 years ago

There is no synchronization between the FileProvider and the FileStore when the Release() call writes data to the file. As a result reads and writes to the same file can happen at the same time. This is bad and can lead to the file being read after the write call has truncated the file but before the data is written.