Description
problem
Strict access control of media files should be available for both media storages, database an file system.
analysis
Media stored in the file system are accessible for everyone. Weired file names do not really protect the files. A robot can generate all possible file names and thus access all media. Strict access control ist only available, when media are stored in the database.
enhancement recommendation
It is very simple to extend pnvfs_db.php to load either pnvfs_dbapi.php or pnvfs_fsdirectapi.php depending on the configuration variable vfs. After adding the getMedia function to pnvfs_fsdirectapi.php the virtual file system works for both media storages, database and file system. This enhances pnvfs_db.php to pnvfs.php (see attached diff file).
Attachments
mediashare-4.0.0-vfs-patch.txt Download (3.1 KB) - added by rmaiwald 6 months ago.
mediashare-3.2.0-vfs-patch.txt Download (3.1 KB) - added by rmaiwald 6 months ago.
vfs-patch for mediashare 3.2.0
Change History
Changed 6 months ago by rmaiwald
attachment mediashare-4.0.0-vfs-patch.txt Download added
Changed 6 months ago by rmaiwald
attachment mediashare-3.2.0-vfs-patch.txt Download added
vfs-patch for mediashare 3.2.0
comment:1 Changed 4 months ago by espaan
Status set to pending-review
Hi, sounds great. To be honest I dont follow exactly what you are doing. Have to dive into the vsf files again.
Can you explain a little more what you patch does that is not being done right now in the current trunk version of mediashare (4.1).
Did you patch your code against the current trunk? A lot of small fixes and enhancements have been made tehre already and the version has been set to 4.1 to show the difference.
Description
problem
Strict access control of media files should be available for both media storages, database an file system.
analysis
Media stored in the file system are accessible for everyone. Weired file names do not really protect the files. A robot can generate all possible file names and thus access all media. Strict access control ist only available, when media are stored in the database.
enhancement recommendation
It is very simple to extend pnvfs_db.php to load either pnvfs_dbapi.php or pnvfs_fsdirectapi.php depending on the configuration variable vfs. After adding the getMedia function to pnvfs_fsdirectapi.php the virtual file system works for both media storages, database and file system. This enhances pnvfs_db.php to pnvfs.php (see attached diff file).
Attachments
mediashare-4.0.0-vfs-patch.txt Download (3.1 KB) - added by rmaiwald 6 months ago.
mediashare-3.2.0-vfs-patch.txt Download (3.1 KB) - added by rmaiwald 6 months ago.
vfs-patch for mediashare 3.2.0
Change History
Changed 6 months ago by rmaiwald
Changed 6 months ago by rmaiwald
vfs-patch for mediashare 3.2.0
comment:1 Changed 4 months ago by espaan
Hi, sounds great. To be honest I dont follow exactly what you are doing. Have to dive into the vsf files again.
Can you explain a little more what you patch does that is not being done right now in the current trunk version of mediashare (4.1).
Did you patch your code against the current trunk? A lot of small fixes and enhancements have been made tehre already and the version has been set to 4.1 to show the difference.