Revision history for Web-VWF

0.005.0	Fri Dec  4 11:28:16 AM EST 2026
	[ Incompatible changes ]
	- The contact page sends mail only for a POST of a form with a CSRF token; a
	link to ?person=NAME no longer sends anything.  Add the form in the example's
	index.tmpl to your own, and set security.csrf.secret.
	- Templates are given cart as a hash of the cookie's entries that have numeric
	quantities, not as the cookie's text.
	- A user agent that contains the name of a listed robot is refused, not only
	one that equals it.
	- Environment values of "0" now override the configuration.
	- A page's server_directory argument, which nothing read, is no longer given.
	- File::HomeDir and Sys::Uptime are no longer prerequisites.  A site whose own
	modules use them must install them.
	- The default allow_ips is now only 127.0.0.1; it also held a public address.
	A site that relied on that must list it in allow_ips.
	- The index page's placeholder login (action=login, with its session cookie
	and redirect to an admin page) has been removed.  Its credentials were fixed
	in the code.  String::Random is no longer needed.
	- Perl 5.26 is now the minimum.  5.20 was declared, but the dependencies do not
	install on it.

	[ Enhancements ]
	- Web::VWF::Display has csrf_token and csrf_valid, and templates csrf_token.
	- Web::VWF::Throttle::over_limit, used by both of the throttles.
	- The example site has a planets page, which reads a flat file with
	Web::VWF::Display::table.  That module takes the site's configuration as
	config, rather than always reading it from disc.
	- Added SECURITY.md.
	- The example configuration shows the allow_ips setting.
	- The directory and config_directory arguments of new() can be set at run
	time with Object::Configure.
	- Documented the response codes and the syslog setting, and added the missing
	SYNOPSIS, DESCRIPTION and VERSION sections.

	[ Bug Fixes ]
	- With a memory_cache that outlives a request, such as File, one client could be
	served a page made for another language, kind of client or set of parameters.
	- The limit of two contact messages for each client was never applied.
	- blacklist_countries written as XML child elements, or as an empty element,
	stopped every request.
	- Settings given to new() or in config_file did not reach the templates.
	- The warning that sendmail cannot be run did not say why.
	- A corrupt DKIM key lost the message instead of sending it unsigned.
	- A .stderr file that could not be written turned every warning into a fatal error.
	- set_cookie accepted a cookie name ending in a newline.
	- The two per-address throttles counted into one total, so a client had half of
	throttle.max_items.  They now count separately, use the backend that works on
	Windows, and no longer delete a store they cannot use.
	- Secrets in the environment are no longer written to debug logs.
	- An error in one request emptied the whole response cache.
	- An unknown name on the contact page gave an empty page.
	- PATH is no longer replaced on Windows, and an unwritable .stderr file no
	longer stops the worker starting.
	- A cart cookie with a quantity that is not a number caused warnings.
	- A client address written with leading zeros was not matched with DShield's.
	- The licence headers of Config and Utils now say GPL2, as the rest does.
	- Web::VWF::Display::table's fetch(key => 0) returned every row.
	- Declare LWP::Protocol::https, without which reCAPTCHA answers cannot be
	checked and the DShield feed cannot be fetched.
	- A syslog setting with a host or a path but no type never sent a record, and
	one that was a plain true value stopped the request.
	- A log that cannot be written is reported once, not on every request.
	- Declare the core modules that the tests use.
	- The config_directory, config_file and config arguments of new() were ignored
	when serving requests.  A site that passes them will now have them used.
	- A request is no longer lost when the syslog daemon cannot be reached: the
	failure to mirror the access record to syslog is trapped, and logged once
	until a write succeeds again, rather than on every request.
	- An access record with wide characters could not be written to syslog, and
	writing it to vwf.log warned "Wide character in print".  Its values are now
	written to both as UTF-8.

0.004.3	Tue Dec  1 10:33:09 AM EST 2026
	[ Bug Fixes ]
	- The CAPTCHA page died with "Can't call method "recaptcha" on unblessed reference",
	so no client over the rate limit was ever shown it.
	- A client over the rate limit is sent a 429 when the CAPTCHA page refuses to be
	built, instead of the worker dying (hard limit) or sending nothing (soft limit).
	- The rate-limit window starts with a client's first request and ends on time.
	Each request used to restart it, so a client that never paused for that long
	was eventually over the limit.  Retry-After is the time left in the window.
	- Requests answered with the CAPTCHA are counted, so that the hard limit can be
	reached when reCAPTCHA is enabled.

0.004.2	Sun Nov 29 08:38:11 PM EST 2026
	[ Bug Fixes ]
	- The Content-Security-Policy blocked D3, leaving the meta_data charts empty, and
	reCAPTCHA, leaving the CAPTCHA page with nothing to solve.
	- The meta_data charts are scaled to their panels instead of being cut off, and
	the slowest endpoints have labels short enough to read.
	- The 24-hour charts run from oldest to newest rather than by the time of day,
	and no longer add yesterday's part of the present hour to today's.  Hours are
	labelled with their day.
	- meta_data no longer fails when there is no access log yet.
	- The index page no longer needs the index database unless it is asked to
	contact someone.
	- A log that cannot be written no longer stops the request or loses the syslog
	record, an empty log is given its header row, and creating the log can no longer
	truncate it.
	- Declare IPC::System::Simple, which `use autodie qw(:all)` needs, and the other
	modules that were used without being declared.
	[ Enhancements ]
	- security.content_security_policy adds sources to the Content-Security-Policy.
	- The instructions for a new website leave the public meta_data dashboard out
	unless it is asked for.
	- Correct the namespace in a documented example, and document the
	Content-Security-Policy and the missing API specifications.
	- The example meta_data.tmpl takes its title from SiteTitle, so that it can be
	copied to a site unchanged.
	- Document what to copy to set up a new website.

0.004.1	Mon Nov 23 08:02:40 PM EST 2026
	[ Bug Fixes ]
	- A missing default databases directory is no longer an error: it is logged at notice
	and no data driver is loaded; one the site names is still an error.

0.004.0	Mon Nov 23 01:51:09 PM EST 2026
	[ Incompatible changes ]
	- The data files and the drivers that read them are now configured apart:
	<databases><directory> is where the data files (CSV, XML, SQLite) are
	(replacing database_dir, which is still read), and <data> declares the drivers,
	one <driver> each, with a <directory> for all of them or for one.  Without a
	directory the drivers are looked for in the databases directory, then @INC,
	rather than only in @INC; only the <directory> of a <driver> is strict, the others
	fall back to @INC.  <databases><database> is no longer read (a warning is logged);
	write <data><driver>.  The example site's states driver is in example/data/ and its data
	files in example/databases/.  The default databases directory is now
	../databases, not ../data, which is for the drivers.

	[ Enhancements ]
	- Documented the six functions in Web::VWF that pod-coverage reported:
	sig_handler, choose, send_error, duration_seconds, blacklisted and filter.
	- Makefile.PL's META_MERGE excludes example/ and Data::Throttler::Backend::VWF
	from the PAUSE index.

	[ Bug Fixes ]
	- Choose the right Perl in the example/cgi-bin/page.fcgi

0.003.1	Thu Nov 19 08:14:20 PM EST 2026
	[ Enhancements ]
	- Web::VWF loads CGI::Alert, so an error that stops a page script is emailed
	to the server administrator (the SERVER_ADMIN setting, or webmaster@localhost
	when the web server has not set one).
	- example/cgi-bin/page.fcgi shows how a site that keeps its modules in a
	private directory (cpanm -l ~/perl5, local::lib) sets @INC: in a BEGIN block
	that comes first in the script, with lib->import, so that the compiled
	modules in the architecture directory are found and autodie cannot load the
	system List::Util before the newer one.

	[ Bug fixes ]
	- A site with no SERVER_ADMIN, such as a FastCGI worker started by
	mod_fcgid, no longer logs "Use of uninitialized value" warnings from
	CGI::Alert every time it starts, which also made the B::Lint and
	warnings::unused checks of page.fcgi fail.

0.003.0	Tue Nov 17 12:05:14 PM EST 2026
	[ Enhancements ]
	- The pages a site serves are declared in <display>, one <page> element for
	each, with a <name> and a <description> (shown in the 300 response).  A
	<directory> in <display> or in a <page> says where the page modules are, instead
	of @INC; with no <page>, the modules found in the <display> directory are the
	pages.  The old <pages> setting, and its string of names, is still read.
	- The data modules a site loads are declared in <databases>, one <database>
	element for each, with a <name>, a <description> and a <directory> likewise.
	A name with no :: in it is a Web::VWF::Data:: module, so <name>states</name> is
	Web::VWF::Data::states.  The old <data_modules> string is still read.  (It is
	not called <data> because Database::Abstraction takes constructor arguments
	from top-level configuration keys, and data is one of them.)
	- File-based caches (Berkeley DB, File) now go in $CACHEDIR, or failing that
	$CACHE_DIR, when either is set, ahead of $root_dir and the configuration; the
	directory is created if it does not exist.  Previously root_dir=example put
	CGI+3a+3aLingua, __db.* and the rest inside example/.
	- The example site has a states page (?page=states), reading
	example/data/states.csv (the 50 U.S. states) through Web::VWF::Data::states,
	Web::VWF::Display::states and states.tmpl, which are in example/lib; and
	example/data/index.csv, the people the contact form can reach.
	- Documented every site setting: a new CONFIGURATION section in the Web::VWF
	POD and the README, with the defaults.  Added the SYNOPSIS and run() to the
	POD, POD for every module, Web::VWF::Utils::env_cache_dir, an AUTHOR and a
	LICENCE section for each, and a LICENSE file.
	- t/pod-coverage.t (an author test) checks that every public subroutine is
	documented, and t/version.t no longer skips a Changes entry that has no date
	yet when checking its version (the date is required under RELEASE_TESTING),
	and checks the example site's modules too.
	[ Bug Fixes ]
	- Require HTML::D3 0.30.  CPAN Testers (Perl 5.44, aarch64 Linux) had 0.23 and
	the meta_data page, t/function.t and t/meta-data-charts.t died with "Data must
	be an array of arrays": 0.23 takes render_pie_chart_snippet($data, $opts)
	positionally, and meta_data passes a hash.  The prerequisite is now declared in
	Makefile.PL, cpanfile and linux.yml, and meta_data checks it on load.
	Fixes https://matrix.perl-magpie.org/results/ffb3469e-de40-11f1-a09d-aafb97416a10
	- Handle captcha display failure
	- The POD of Blacklist, Utils and Config still used the old VWF:: names, so
	its SYNOPSIS did not load.
	- Data::Throttler::Backend::VWF, which Web::VWF::Throttle defines in another
	distribution's namespace, is no longer offered to PAUSE (no_index).
	- Declared Test::Needs, which t/pod.t uses, and recommend Mail::DKIM and
	Crypt::OpenSSL::RSA for the tests that sign a message.
	- ASCII only in the source of Web::VWF; one line indented with spaces now uses tabs.

0.002.0	Wed Nov 11 08:54:17 PM EST 2026
	[ Enhancements ]
	- Added Web::VWF::Mail: sends mail through sendmail(1), signed with DKIM when
	the site configures DKIMSelector and DKIMKey.  Mail::DKIM is recommended,
	not required; without it, or without a key, mail is sent unsigned.
	Web::VWF::Display::index now sends through it.
	- Mail rejects a sender that could be read as a sendmail option or a header.
	- Declared the dependencies that were only loaded lazily and so were missing
	from the build files: Data::Validate::URI, DateTime, LWP::Simple::WithCache,
	Time::Duration::Parse, XML::LibXML and YAML.
	- Debug logging of the configuration now redacts secrets, keys and tokens
	(Web::VWF::Utils::redact_config).
	- Every module now carries the distribution's $VERSION.
	- Documented the API of new(), and of Web::VWF::Mail.
	- Corrected the README and POD, which described a site layout that is not in
	the distribution, and fixed 8-space indentation in two modules.
	- Declared the licence as GPL2 in the metadata, and kept example/ and t/ out
	of the CPAN index.

0.001.0	Tue Nov 10 09:00:49 PM EST 2026
	First draft
