*MERGE* Improve the big-/little-endian compile-time detection in sha1hard.c so that it works on PowerPC. Full details of the report and fix are in the wiki page attached to [384705b56ac], which this merge integrates. (tags: trunk) #Programming #VersionControl #Software
Add wiki page: checkin/384705b56ac5adb3e33ecbc5a4dd8e33393caed8b96f02afbb7799667afffe07 #Programming #VersionControl #Tech
Improve the big/little-endian detection in sha1hard.c and fail fatally if a mismatch is detected. This is a proposed fix for BE breakage but is untested for lack of hardware. (tags: sha1hard-be-fix) #Programming #VersionControl #Software
The current "case-sensitive=false" setting (the default on Windows and
macOS) works only for ASCII for lack of Unicode tables to do this
correctly without bringing in something like ICU. This branch adds
a generator that produces a header file containing a distilled version
of the Unicode case-folding data tables, then defines a new SQL
collation backing it. (tags: unicode-file-name-case-folding) #Programming #VersionControl #Unicode
Match gitpush addresses for pragma link by their whole scheme, http:// or https://, so that an scp-style address whose user name begins with http is left out too. (tags: small-fixes) #Programming #Git #Developer
When a server lists links to other repositories in answer to pragma req-links, give only gitpush addresses that are http or https URLs, as for syncwith and syncfrom. An address such as git@host:path was parsed as a file name and ended the reply with an unknown-repository error. (tags: small-fixes) #Programming #DevOps #Git
In manifest_is_well_formed(), refuse input that does not end with a newline before removing a PGP signature, as the artifact parser does, so that the two agree on a signed artifact with nothing after its signature. (tags: small-fixes) #Git #Coding #Software
In manifest_is_well_formed(), accept a second card that has no argument, such as an empty P-card, which the artifact parser accepts. Otherwise import --git did not sterilize a file holding such an artifact, and the rebuild made it a real one. (tags: small-fixes) #Git #Coding #DevOps
Collected orthogonal tests in test/th1.test so they run inside a single
child process instead of needing a separate spawn per. Even on Linux,
where this is ultra-fast, it cuts a second off the total run time for
this piece of the test suite. Under ASAN, it can cut multiple seconds
off the test run. (tags: test-suite-new) #Programming #VersionControl #Software
Reworked the wiki date collision test from a stochastic process that
typically takes ~30 seconds to trip here to a planted collision test
that hits in ~4 seconds. (tags: test-suite-new) #Programming #DevOps #VersionControl
Reworked test/utf8.test along those same lines, giving the real payoff
behind the redesign: the prior ~30s run now takes about a second at the
default -utf-assurance=smoke level while retaining the old =ci level. (tags: test-suite-new) #DevOps #Programming #Git
Reworked the UTF-8 file name classification tests along two lines:
* Stratify the type checks so that a new `-utf-assurance=smoke` test
level checks only one of each type. A higher =ci level is the prior
level of test redundancy, and a new =stress level is merciless.
* Take the actual filesystem behavior into account by probing once at
tester.tcl startup time so we don't have to hard-code a static
"failure expected" flag and hope we got it all right. We now
*predict* behavior at runtime and report divergences.
This cuts the test/unicode-pathnames.tcl runtime to a third. It doesn't
save much, net, since the total was only a few seconds, but there's more
to the above than speed. (tags: test-suite-new) #DevOps #VersionControl #Software
The two test/settings*.test scripts were partially redundant and ended
up retesting each setting twice. It was for different reasons in each
case, but we can get the benefit by doing one pass for all settings and
augmenting it with a small random sampling in the second pass. Saves
~8 seconds here. (tags: test-suite-new) #Programming #VersionControl #Software
Replaced the hard-coded 100-iteration test loops with a -trials flag
defaulting to 20, to allow restoration of the old count for a longer
(i.e. overnight/CI) stress test. This alone cuts over 1 minute from
the `make test` time here. (tags: test-suite-new) #DevOps #Programming #Git
In client_might_be_a_robot(), report a command run from the command line as not a robot. Outside an HTTP request the robot check sent its Browser Verification page with cgi_reply(), which has no output there: "fossil test-th-eval" of styleHeader crashed. Reported by Dan Shearer. (tags: small-fixes) #DevOps #VersionControl #Programming
*MERGE* Merged trunk in, for all the recent fixes (tags: test-suite-new) #Programming #Git #Tech
Fix test for th1 element manipulation: briefly switch off robot-restrict. (tags: test-suite-new) #Programming #VersionControl #Developer
Delete th1 test th1-encode64-3, because it depended on a hardcoded fossil
source version and the test otherwise has modest value. Perhaps worth
reinstating in a better way later. (tags: test-suite-new) #Programming #DevOps #Git
In roundtrip.test, remove Windows-specific glob directory results: _FOSSIL_ ,
and, anything starting with "." (which Unix glob will not return.) (tags: test-suite-new) #Programming #DevOps #VersionControl
Sort the dictionary made from a directory file listing, because "glob"
lists files in different orders depending on OS and filesystem. Found
by testing on a FreeBSD UFS directory; may fix Windows as well. (tags: test-suite-new) #Git #Programming #Software
*MERGE* Improve defenses against hostile command-line arguments in commands that
call out to other programs (like ssh) using popen. (tags: trunk)
Update the built-in SQLite to the latest 3.55.0-alpha trunk version, for
beta-testing of SQLite. (tags: trunk)
Fix src/http_ssl.c in [6753e74e26c9167c] so that it works with older
versions of OpenSSL found on archaic platforms that cannot upgrade. (tags: trunk)
In client_sync(), accept file and cfile cards only in a sync that pulls. A server could otherwise add artifacts to the client in answer to a push. (tags: small-fixes-2)
In client_sync(), let an igot card mark an artifact that the client holds as private only in a sync of private content. In an ordinary pull a server could make a public check-in in the client private, after which a push or sync no longer sent it. A phantom is still marked, so that it is not asked for again. (tags: small-fixes-2)
In client_sync(), act on uvfile and uvigot cards only in a sync of unversioned content or in a clone. A server could otherwise replace an unversioned file in the client during an ordinary pull, and a uvigot card ended an ordinary pull with an SQL error. (tags: small-fixes-2)
On Unix, do not run the gmerge-command when the name of the file, as it is given to the command, holds a double quote, a dollar sign or a backquote. The names are put into the command as they are, so such a name reached the merge tool as several arguments or stopped the merge with an abort. The conflict is left marked in the file, with a warning. (tags: ssh-arg-quoting)
Escape "~" in blob_append_escaped_arg() on Unix. An argument that began with "~" went to the shell unquoted and was replaced by a home directory, so that the path in ssh://host/~/repo.fossil was expanded on the local machine and not on the server. A setting whose value begins with a literal "~" is no longer expanded when it is passed as an argument. (tags: ssh-arg-quoting)
Put "--" before the host name on the ssh command lines of "fossil patch push", "fossil patch pull" and "fossil ui HOST:REPO", as the ssh transport already does, so that ssh does not take a user name that begins with "-" for an option. (tags: ssh-arg-quoting)
In the ssh transport and in "fossil ui HOST:REPO", refuse a repository name that holds a character special to a shell, and refuse such a character in the fossil= parameter of an ssh:// URL. The name was quoted for the local shell only, and the login shell on the remote system parsed it again. An ssh:// URL that is refused is reported as a failed sync and no longer as a fatal error. (tags: ssh-arg-quoting)
In manifest_parse(), compare the size on a W-card with the number of bytes that remain, without adding it to a pointer. A size of 4294967295 wrapped to zero inside the check, was accepted, and moved the parse far past the end of the artifact. (tags: small-fixes-2)
In next_token(), set the length to zero when there is no token. A K-card or Z-card with no argument kept the length of a token from an earlier card, passed its check on that length, and gave validate16() a null pointer, which crashed manifest_parse(). (tags: small-fixes-2)
In vxprintf(), do not read a %s argument past the number of bytes given as its precision. The whole string was measured before the precision was applied, so %.*s on a buffer with no terminator, as in the certificate prompt of ssl_open_client(), read past the end of the buffer. (tags: small-fixes-2)
In send_unversioned_file(), finalize the statement before returning when a SHA3 hash cannot be sent to a client older than version 2.0. Leaving the statement, a local variable, on the list of open statements made the next finalize read and write a stack frame that had already returned. (tags: small-fixes-2)
In html_header(), stop building the heading id when an unclosed tag or entity reaches the end of the text. The scan stepped over the terminator and continued past the end of the text. (tags: small-fixes-2)
In parseMarkup(), note the character that ends an attribute value even for an attribute that is ignored, and stop the scan at the end of the string. A tag with an unrecognised unquoted attribute ran past the markup and into the text that followed. (tags: small-fixes-2)
In file_relative_name(), append the remainder of the path by its own length, and do not add a second trailing slash under --slash. The length was taken from the working directory's name, so the path's terminator and the bytes after it were read and copied. (tags: small-fixes-2)
In "fossil rebuild" and "fossil deconstruct", leave an artifact alone when its content cannot be rebuilt because it is a delta from something that has not arrived. Rebuild recorded its size as zero, which stayed wrong after the source arrived, and deconstruct wrote an empty file. (tags: small-fixes-2)
Give sqlcmd_autoinit() the signature that SQLite calls an automatic extension with. The undefined behavior sanitizer of Clang reports the call through a pointer to a different function type. (tags: small-fixes-2)
Do not set the RLIMIT_DATA limit in fossil_limit_memory() when built with AddressSanitizer. On Linux the limit made every command of a sanitizer build stop at startup with an out of memory report. (tags: small-fixes-2)