articles/freebsd-update-server: Move to distset-update-server
Move the article on building distribution set update server out of the
way so that the new article on building a base system package update
server can take it's place. Improve the warning at the top while here.
This article is unfortunately out of date and needs to be fixed because
distribution sets will be supported until 31 December 2029.
With hat: doceng@, re@
Approved by: cperciva
Differential Revision: https://reviews.freebsd.org/D61655
ports-autocomplete.cgi: use the OpenSearch suggestions content type
Send application/x-suggestions+json instead of text/javascript;
the response is JSON, not JavaScript.
ports-autocomplete.cgi: no default query
Without a query parameter the script returned suggestions for
the test query "bbbike". Return an empty list instead.
ports-autocomplete.cgi: apply Firefox workaround after sorting
The "::" and "." workaround changed the data before the prefix
sort, so queries containing "::" or "." never matched as a
prefix. Apply it to the final list instead.
ports-autocomplete.cgi: fix prefix sort for case-sensitive search
With icase=0 the data was still lowercased before the prefix
check, so queries with uppercase letters never matched as a
prefix.
ports-autocomplete.cgi: harden input handling
Limit the query to 64 characters, ignore the debug parameter
for web requests, and remove IFS, CDPATH, ENV and BASH_ENV from
the environment before running grep.
ports.cgi: don't read INDEX for invalid package queries
A pkg search with a query that is not a valid category/port
path fell through to the INDEX search, which never matches
stype=pkg. Skip it and show "nothing found" directly.
ports.cgi: sanitize query in log message
A newline in the query could inject fake lines into the error
log. Replace non-printable characters before logging.