Section One BBS

Welcome, Guest.


Subject: src/sbbs3/ftpsrvr.c src/sbbs3/scfg/scfgxfr1.c src/sbbs3/scfgdefs.h scf Date: Sat Jan 15 2022 04:20 pm
From: Rob Swindell To: Git commit to main/sbbs/master

https://gitlab.synchro.net/main/sbbs/-/commit/1ab2956baad6304f3510f091
Modified Files:
        src/sbbs3/ftpsrvr.c src/sbbs3/scfg/scfgxfr1.c src/sbbs3/scfgdefs.h scfgl
ib2.c scfgsave.c userdat.c userdat.h websrvr.c
Log Message:
Add direct filebase access from the web server (optional)
                                                         
                                                         By setting SCFG->File O
ptions->Web File Virtual Path Prefix to something (e.g. "/files/"), all HTTP or 
HTTPS requests to the Synchronet Web Server with request paths beginning with th
is prefix will be interpreted as filebase access requests (with full access cont
rol enforcement). This is configured here (in SCFG) rather than, say, the [web] 
section of sbbs.ini, because I have plans for the terminal server to use this pr
efix to generate Web-URLs for files to display or email to users.
                                                                 
                                                                 Currently, only
 requests to *files* (for download) are supported (no index generation, file inf
ormation, etc. and definitely no upload support). Full access control (using HTT
P auth, not cookies) is used for libraries and directories with controlled acces
s. Credits are deducted and awarded and uploaders are notified of downloads, as 
one would expect. Requests to any dynamic-web-content files (e.g. .SSJS, .XJS, e
tc.) will be treated as static file download requests (no script will be execute
d).
   
   I'm reusing the same virtual path parsing logic from the FTP server (moved to
 the userdat lib), so the virtual path to a file for download would be, for exam
ple, http://yourdomain/files/lib/dir-code/filename.ext
                                                      
                                                      The main motivation for th
is feature is: FTP-links in email and web pages are just not useful to many user
s these days and I don't think that sysops should have to rely on a SSJS web UI 
(e.g. ecWebv4, cool as it is), to provide web-access to the filebases. Using thi
s feature, you can share simpler/shorter web links to your files that will be mo
re enduring.

---
 ■ SynchronetVertrauen Home of Synchronet [vert/cvs/bbs].synchro.net

Previous Message       Next Message
Replies: Re: src/sbbs3/ftpsrvr.c src/sbbs3/scfg/scfgxfr1.csrc/sbbs3/scfgdefs.h scf (Ragnarok)