Messy attempt at letting users modify the configuration variables without making the software a "modified version".
Dexter is a Mojolicious webapp that handles the generation of index pages under a directory and provides a method for authenticated users to upload files, delete files, create directories, and move files.
Dexter depends on these Perl modules:
Install them using
cpan or however else you get your Perl modules.
Once the proper modules are installed, clone this repository to wherever you want Dexter to reside. For me on my OpenBSD web server, that's
After that, Dexter can be ran under any web server as a CGI or PSGI app, or via Mojolicious' builtin
hypnotoad servers. See
examples/openbsd/etc/dexter/ for the configuration files that I use on my OpenBSD web server to connect Dexter with
Configuration is done by modifying the constant variables in
Dexter expects authentication to be done on the web server, and relies on the
REMOTE_USER environment variable to determine which user is using the app and what their permissions are. If a user is not authenticated, Dexter assumes their username to be 'guest'.
Dexter determines authorization by applying the first match approach to a list of regex/number pairs (rules) stored under the authenticated user's username in the
%USER_ACCESS_RULES hash defined in
dexter.pl. When determining whether a user has the appropriate permissions to perform an action on a given path, Dexter iterates through the rules under a user's name until a regex matches the path. Dexter then performs a binary and of the corresponding permission number and the permission number required for the requested action. If the resulting number equals the number required for the requested action, the action is permitted.
If no rule matches, the requested action is denied.
Dexter needs to know about two directories you want it to use:
$ROOT_DIRECTORY: The directory that Dexter will be serving files from and saving uploaded files to. This is effectively the root directory of the website, and needs to be configured on the web server as well.
$SOCKET_DIRECTORY: The directory where Dexter's UNIX domain socket will be. This is only required if Dexter is running on OpenBSD, as Dexter needs to
unveilthe socket directory in order to be run as a PSGI daemon.
$MAX_REQUEST_SIZE: The maximum size of POST requests that Dexter will process.
$FS_ENCODING: The character encoding that the underlying filesystem uses to store filenames. The default value of
UTF-8is most likely correct.
Dexter is released under Version 3 of the GNU Affero General Public License (see
LICENSE). In the case of this software specifically, any changes made to the assigned values of the variables
%USER_ACCESS_RULES do not qualify as modifying the software as defined in the terms of the GNU Affero General Public License, as these variables exist for configuration purposes. Any other changes made to the source code of this software still qualifies as "modifying" the software under those same terms. The default font- JetBrainsMono from NerdFonts- is released under Version 1.1 of the SIL Open Font License (see