@@ -45,7 +45,9 @@ func (fs *FileSystemStorage) GetBlobURL(uid, blobid string, write bool) (docurl
4545
4646// LoadBlob Opens a blob by id
4747func (fs * FileSystemStorage ) LoadBlob (uid , blobid string ) (reader io.ReadCloser , size int64 , hash string , err error ) {
48- blobPath := path .Join (fs .getUserBlobPath (uid ), common .Sanitize (blobid ))
48+ uid = common .SanitizeUid (uid )
49+ blobid = common .Sanitize (blobid )
50+ blobPath := path .Join (fs .getUserBlobPath (uid ), blobid )
4951 log .Debugln ("Fullpath:" , blobPath )
5052
5153 fi , err := os .Stat (blobPath )
@@ -77,7 +79,9 @@ func (fs *FileSystemStorage) LoadBlob(uid, blobid string) (reader io.ReadCloser,
7779func (fs * FileSystemStorage ) StoreBlob (uid , id string , fileName string , hash string , stream io.Reader ) error {
7880 log .Debugf ("TODO: check/save etc. write file '%s', hash '%s'" , fileName , hash )
7981
80- blobPath := path .Join (fs .getUserBlobPath (uid ), common .Sanitize (id ))
82+ uid = common .SanitizeUid (uid )
83+ id = common .Sanitize (id )
84+ blobPath := path .Join (fs .getUserBlobPath (uid ), id )
8185 log .Info ("Write: " , blobPath )
8286 file , err := os .Create (blobPath )
8387 if err != nil {
0 commit comments