Age | Commit message (Collapse) | Author |
|
On Windows the preferred encoding is cp1252, which makes
zero sense for text files. This change will force it
to UTF-8, which is a sensible choice that works best.
Test-Information:
Build now works on Windows 2012 with MSVC 2015 32bit,
with test=unit.
Change-Id: I3324d41fe33df98cdd5b90e0712f741f401176c3
|
|
Test-Information:
Unit tests pass on Debian 9
Change-Id: I60f95816cfa48a619f83daac1d88e229bbe228ed
|
|
Test-Information:
Compiles
Change-Id: I5bfbf270524a1a31c9105f108f47f64eb95276d1
|
|
As of Boost 1.69.0, boost/detail/endian.h is deprecated in favour of
boost/predef/other/endian.h, and BOOST_(LITTLE|BIG)_ENDIAN by
BOOST_ENDIAN_(LITTLE|BIG)_BYTE.
Test-Information:
Unit tests pass on Debian 9
Change-Id: If7076c559a4e35219ff97603f50b80cfbe05b29b
|
|
In boost 1.68.0 the conversion is implicit, but in 1.69.0 it's
explicit and we must explicitly call it.
Change-Id: I24eb78be7510c89b88342d28c539cad4977f99fd
|
|
The merge of 4.x changes onto master introduced changes to Pyhon scripts
that weren't compatible with Python 3.
The Version.py script is now compatible with both Python 2 and Python 3,
and a slightly underimplemented test has been expanded to actually live
up to its name. getGitBuildVersion has been refactored completely. It
has been simplified to require only one invocation of git describe, unit
tests for the parsing have been added, and a way to call
getGitBuildVersion from the commandline has been added to Version.py (to
avoid adding a unit test that would call out to an external tool).
DocBook.py has been made compatible with Python3, and some additional
logic to prevent emitting b'path/to/docbook/xml' instead of the desired
'path/to/docbook/xml' has been added.
Generation of COPYING in Swift/QtUI now uses the upstream version
provided with SCons 3, and our custom version has been removed.
Unused code in the SwiftenDevelopersGuide SConscript with invalid
regular expressions has been removed, and the remaining regular
expressions in SConscripts have been fixed.
Test-Information
Code has been tested on macOS 10.14.
Scons now completes a build on a clean tree using either Python 2 or
Python 3. Running it on a previouly built tree works with either, as
well, mixing versions between invocations is not an issue.
Swift unit tests pass with Python 3.7.0.
Version.py unit tests pass with Python 2.7.15 and 3.7.0.
Running with doc=1 works with both Python 2 and Python 3, even
if the docbook points to a path with unicode characters in it.
Resulting COPYING file has been verified both visually and against a
Python2 generated one on master.
Resulting XML files for documentation have been inspected.
Resulting manual HTML and PDF files have been inspected.
Change-Id: I54de909d80b8e35a8c351261ae10ce3537729c84
|
|
The previous code only worked with 1.1.0j or older.
Now the code works with 1.1.0j and OpenSSL 1.1.1.
Adjusted ClientServerTest to be more graceful in case
of errors, i.e. failing tests instead of crashing.
Test-Information:
Tested that without the changes, the tests pass with
OpenSSL 1.1.0j and test fail or crash with OpenSSL
1.1.1 and OpenSSL 1.1.1a.
Tested that with the changes, the tests pass with OpenSSL
1.1.0j, OpenSSL 1.1.1, and OpenSSL 1.1.1a.
Tested on macOS 10.14.2 with system clang.
Change-Id: Ic63774049727f6d949153166f63a8545e9a24892
|
|
OpenSSL TLS contexts assume ownership of any additional certificate
passed into it. The CertificateFactory now returns a vector of
unique_ptrs, and OpenSSLContext will do the needful with releasing
ownership at the right moment.
A unit test has been added that uses a chained certificate in
client/server context. Before the fix, this test would either fail, or
result in a segmentation fault, depending on the mood of OpenSSL.
Test-Information:
Unit tests pass on Debian 9
Ran manual tests with server test code, tested both chained and single
certificates, and no longer observed crashes when accepting a
connection.
Change-Id: I21814969e45c7d77e9a1af14f2c958c4c0311cd0
|
|
Without this you could not pass through Google Test flags
down, because they would be used as CppUnit test names
and exit the tool early as the test do not exit.
Test-Information:
Verified that flags are passed along. This allows to
filter specific Google Test test cases. Running checker
without parameters still works.
Tested that things build on Debian 9.6.
Change-Id: I4d4b97a84e2baf81a25cc2f9641c6e49594c0044
|
|
* branch 'swift-4.x':
Update for Debian
Don't crash on missing bookmark result
Add missing include for QAbstractItemModel
Update Debian changelog
Fix convertToWindowsVersion() function to handle more RCs
Fix error response handling when requesting VCards
Test-Information:
./scons test=all succeeded on macOS 10.14.2.
Change-Id: I99d20a8b0e1b0be501fbbe95adebbff15f510184
|
|
TLSError now takes an optional error message. OpenSSLContext has been
updated to send out one, and calls to SWIFT_LOG have been removed from
it for anything but setCertificateChain.
OpenSSLContext::handleDataFromApplication misinterpreted the return code
of SSL_write, triggering an onError in cases where more network I/O was
required.
Test-Information:
Unit tests pass on Debian 9
Server test code no longer emits undesirable warnings to stderr on macOS
10.14.
Change-Id: If0f932693361ef9738ae50d5445bfb4d3ed9b28f
|
|
Fix UTF-8 handling issues in
BuildTools/SCons/Tools/textfile.py .
Test-Information:
Tested that ./scons test=unit Swift works on Debain
Unstable (sid) and macOS 10.14.2. Tested that
build_for_debian.sh runs successfully on latest Debian
Unstable (sid).
Change-Id: I29d8c97ce3b4eb3e4fd680bdc814fb0c911262ff
|
|
Test-Information:
Before the patch, boom, after the patch, no boom.
(No boom today. Boom tomorrow. There's always a boom tomorrow)
Change-Id: Id454d7b0d0cd05774d0f1ee0b3cb77057371c459
|
|
Swiften handles roster push event notifications, but those were
not passed to Sluift, so a Sluift client, when querying events,
would not be aware if an XMPP server roster pushes.
This patch adds extra events types to Sluift so that method
for_each_event reports roster pushes notifications.
Test-information:
Used sluift client to retrieve all items after adding, removing and
updating roster items, and now Sluift clients can see these events.
Change-Id: Ide5597bf2b39e3cc20014c66ba9153c551eec670
|
|
A numeric cast was added to the call to HMAC that doesn't belong there,
this commit reverts that.
Test-Information:
Unit tests pass on macOS 10.14 and Debian 9
Change-Id: I8deb568f7bff4d401fc6dd6de21edf7f061ebd59
|
|
Test-Information:
Added unit tests
Change-Id: I405d9e9c2b64c4953ca0cec8f6481b695c15e30f
|
|
We can't target 10.5 any more with the latest xcode, so instead
of thinking too much about the right thing, just bump to 10.6
for the moment.
Test-Information:
Builds again on Mojave
Change-Id: I3975a3ce0c8246ba4dabb0f86390060c4c4a1972
|
|
The filetransfer blockSize is now an unsigned integer, as 0 could be
used to denote an invalid block size as well (and indeed, already
indicated that better than -1 did).
All use of numeric_cast in filetransfer code has been fixed to deal with
the possibility of thrown exceptions.
Test-Information:
Unit tests pass on macOS and Debian
Change-Id: I1833d553bae071238be20ebc386ef602effb78b0
|
|
The two uses of numeric_casts have been rewritten as static casts, with
asserts to guarantee (and inform the developer) that the number is never
negative (code inspection showed that this should never be the case).
Test-Information:
Unit tests pass on macOS and Debian
Change-Id: I3ca63724721ecd8e351d9017e0975b6ae326f85f
|
|
Generation of TXT records might fail if any of the fields is too long,
so the result is now an optional (pending Expected). Callsites have been
updated to deal with this.
Three potentially uncaught exceptions in the Bonjour implementation have
been addressed.
Test-Information:
Unit tests pass on macOS 10.14 and Debian 9
Change-Id: Iec02c4606a18eee855362fd3c3d15614a9e72547
|
|
Exceptions thrown by boost::numeric_cast are now caught and an assert
explicitly triggered.
Test-Information:
Unit tests pass on macOS 10.13
Change-Id: I9a1cbe5ae2765e4275bf35473a871ef8468fd729
|
|
Apart from QtUI bits, this addresses use of uncaught numeric cast
exceptions in message count handling, the spell parser and the MacOS
idle querier.
The WindowsServicePrincipalName logic previously had an issue where
using ports from 32768 onwards would result in a bad_numeric_cast
exception to be thrown. This has been addressed at the same time as the
uncaught exceptions, and all ports should work now.
The tags file has been extended to ignore more files.
Change-Id: I73ced35f06517bee5c58f990d20fa437b40ac84e
|
|
The stanza ack code now uses a constexpr without numeric cast to
calculate the maximum, and test code uses the constant UINT32_MAX from
limits, both of which should result in the same number.
Test-Information:
Unit tests pass on macOS 10.14
Change-Id: Iba8fc779e52699d480d1ce458df0c6581a16ad06
|
|
Test-Information:
Unit tests pass on Debian 9 and macOS 10.14
Change-Id: I7881249c68a294679a6a9d0f6bef65cad5034687
|
|
The code has been updated to use asserts where a sensible recovery path
was deemed impossible, and a conditional return for parse. In general,
our XML parsing will fail for any single parse of a document over
roughly 2 2GiB, which is probably not going to be a practical issue soon.
Test-Information:
Unit tests pass on macOS 10.13 using Expat and Debian 9 using LibXML
Change-Id: I3a8da802860028ea278b322af081c2b22b55a442
|
|
The NAT-PMP RFC specifies lifetime as an unsigned, 32 bit integer, so
using this internally makes sense. This also removes the need for casts
in interface code.
A slight bug in the NATPMPInterface implementation to remove a mapping
has been addressed.
Test-Information:
Unit tests pass on macOS 10.13
Change-Id: I06687fd2735a8706f339f85d6c957ad7aadaaf02
|
|
LibIDNConverter was fixed to handle these restrictions
correctly.
Test-Information:
Added unit tests for RFC 1035 length restrictions for labels
and domain names.
The libidn and ICU backends pass the new test.
Change-Id: Ie570b0ee4c5c6381f7769f6178ec2a5824074221
|
|
Since the counters cannot be negative, changing the type used for unread
counters to size_t seems a better fit, and it avoids the need for
numeric_casts.
Test-Information:
Unit tests pass on macOS 10.13
Change-Id: I61badcfc410f0cce7f922da90b50ef5a809c6521
|
|
Network ports are now consistently stored as unsigned shorts, apart from
the options and user interface, where -1 is still used to denote the use
of default ports.
Test-Information:
Unit tests pass on macOS 10.13 and Debian 9
On macOS: tested the UI with various proxy and manual ports, behaviour
as expected.
Change-Id: I7a65f40083022887aa30ed7b21eadc56d0c52be1
|
|
RFC 6122 specifies that if a domainpart ends in a dot, it must be
stripped off before any other canonicalisation steps are taken.
Unit tests have been added to check that various JID scenarios with a
domain ending in a dot pass or are rejected as expected.
Test-Information:
Unit tests pass on macOS 10.13.
Manual tests in sluift show expected behaviour.
Change-Id: Id6813aaa4422a81bff0a4559eacd6855ef104dc3
|
|
ICUConverter allowed jidparts greater than 1023 bytes during
stringprep.
The SConscript of StorageTest did not work when libidn had been
disabled, which prevented test=unit from completing.
Test-Information:
Unit tests pass on Debian 9 in a build with ICU and ASan enabled.
Change-Id: I791a09457c6b852e61ce1281871e0f3ca0ce645c
|
|
When Swift::LibIDNConverter::getStringPrepared was called with an input
of 1024 or more characters, stringprep would be called on a memory
region that wasn't NUL-terminated. It also blindly trimmed the input to
1024 bytes, even though there may be input longer than that that still
results in a valid 1023 byte prepped string.
IDNConverterTest has been converted to gtest, as cppunit cannot deal
with testing for std::exceptions being thrown on at least macOS
Test-Information:
Unit tests pass on macOS 10.13 and Debian 9
Before fix, the newly added unit tests triggered an ASan abort due to a
buffer overrun.
After fix, all unit tests pass, even with ASan enabled.
Change-Id: Ia3e51a39f5db1de32b8f8bb388f81ca041136df7
|
|
The Component::disconnect() was controlling the running of the
event loop with the isAvailable flag, but it turns out that
depending on timing, a re-connect could be attempted and
the component erroneously claim that the "Component is already
connecting or connected", which could not possibly the case
if the first attempt to connect the component failed (hence,
not possible it was connected).
By updating the event loop to use the correct isActive flag,
this issue is fixed.
This error was highlighted as a result of the previous commit
"Prevent connect on active sluift clients and components".
Also, the getNextEvent is fixed to do not suffer from the
same problem, and use isActive instead of isAvailable.
Test-information:
Before the patch, a test that would attempt a second component
connect after a failed one would randomly fail.
After the patch, a test that would attempt a second component
connect after a failed one has passed hundreds of time without
failure.
Change-Id: I20be6b1c8aec485ded3330c143dedd2161c4c66e
|
|
Ran a flamegraph diff on Swift login to an account with a
moderate number of JIDs in roster and more than 10 rooms
in auto join. It showed a difference less that 0.1% on the
changed method. As it does not make much of a difference for
Swift at least, caching is removed.
Test-Information:
Unit tests passes, Swift still logins fine on macOS.
Change-Id: Id33d6d1a655580e06e1364df717fd6f34cce5327
|
|
Test-Information:
Builds and compiler warnings in not emitted by clang 8.0.0
anymore.
Change-Id: I118552b3b058acd15cdb9579e3695d9bf3d6b2fe
|
|
Connect should not be called twice on clients or compoments without
disconnecting first. While this worked in some cases, mixing connect
options, specifically first trying without, and then with a bosh_url,
would lead to asserts being triggered.
The connect logic now checks whether there's already a connection in
progress or established, and raises a Lua exception early if there is.
Test-Information:
Tested on macOS 10.13
Connected components and clients with invalid and valid hosts, and with
valid and invalid bosh_urls, all with and without disconnecting in
between attempts. No asserts were triggered, and appropriate Lua
exceptions were thrown.
Change-Id: I6b91b57945844bce7fce0073e5d0fe199ab815d5
|
|
Debug builds building with /MDd will otherwise fail on
Windows with MSVS 2015.
Test-Information:
Builds successfully with /MDd flag on Windows using MSVS 2015.
Change-Id: I9ac7e9408f09354025bb39cb5642efce686d11f0
|
|
Test-Information:
Builds in default configuration on Windows 10 with MSVS 2015.
Change-Id: I82e6a317820168d471694c8ee1f33b652515c0d9
|
|
r literal is supported by both Python 2 and Python 3.
Test-Information:
Builds on Windows 10 with Python 3 and VS 2015.
Change-Id: I2210a1ba01a4bf3c175634adeb067f1f939a7e61
|
|
When BoostConnectionServer tries to set up a listener, it casts an int
to an unsigned short, which may throw an uncaught exception if the cast
fails.
Test-Information:
Unit tests pass on Debian 9
Test server code no longer crashes when it tries to set up a listener on
an invalid port.
Change-Id: If6b920e54481ce6bf174df01d14ad12eff90e3f4
|
|
This also has our scons patch in 3rdParty/SCons applied.
Test-Information:
Builds with unit tests on macOS 10.13.6.
Change-Id: I25d3662eeec27a76dab10d501ba46dc16f0bef4b
|
|
Test-Information:
Builds, unit tests and integration tests pass on macOS with
clang 7.0 master.
Change-Id: I0db411e49339ccb2301edd1a16612cb1ad2c927c
|
|
Test-Information:
Builds, unit and integration tests pass on macOS with
clang 7.0 master
Change-Id: Idb9648c1293adbe6f4b79af3ad619ebb0630e48d
|
|
Test-Information:
Builds and unit tests pass on macOS with clang 7 master.
Change-Id: I0bf2828db49dfb6a7e99c78f1d2f7e76e87f8ca1
|
|
Test-Information:
`./scons test=all` passes with no errors on macOS with clang
7 master.
Change-Id: I31765ac15750dc5af7b70d1a85171dc8e3590181
|
|
This has clang-tidy write changes out to YAML files in
parallel and finally runs clang-apply-replacements which
merges, deduplicates and applies the changes in serial.
Uses Python to determine the number of parallel jobs to run.
Test-Information:
Tested by adding new checks and running clang-tidy-fix. Works
as described above and is much faster compared to a serial
`clang-tidy -fix` run.
Change-Id: Idb357e63edeba75ef9a4fb53f5ddef2a7c3c23ee
|
|
TLSLayer and TLSConnection now own the TLSContext they use.
The TLSContextFactory interface is adjusted to use
std::unique_ptr.
Test-Information:
Builds and all tests pass on macOS with clang-7-master.
Change-Id: I14e33c98b48445094f404b73ea41af0a51d2dde6
|
|
Done by adding --fix --fix-errors to the clang-tidy args in
the Makefile
Test-Information:
Unit tests pass (macOS)
Change-Id: I3a4df955ac3553afeb9384f23f9d8b2ef01117e2
|
|
This doesn't address the issue in ChattablesTest that the
checks against 0 are being reported as checking null against 0
literals.
Test-Information:
Fewer warnings after the change (macOS).
Change-Id: I24330f0ab99d6eb267e03a46983ced75e42c22cc
|
|
This adds a single check (which is already enough to fail).
clang-tidy < 7 requires absolute paths in the
compile-commands.json, which isn't what will happen here. If you
want to run with a previous version (6 is latest, 7 expected in a
month), apply this patch (which will break normal ninja
compilation, thus not applying it properly, and I'm not sure
it's worth any time getting it work when the clang-tidy bug is
fixed imminently):
diff --git a/BuildTools/scons2ninja.py b/BuildTools/scons2ninja.py
index df4c6559d..13e78d650 100755
--- a/BuildTools/scons2ninja.py
+++ b/BuildTools/scons2ninja.py
@@ -168,8 +168,16 @@ class NinjaBuilder :
self.variables += str(name) + " = " + str(value) + "\n"
def build(self, target, rule, sources = None, **kwargs) :
+ if is_list(target):
+ target = [os.path.abspath(x) for x in target]
+ else:
+ target = os.path.abspath(target)
self._build += "build " + self.to_string(target) + ": " + rule
if sources :
+ if is_list(sources):
+ sources = [os.path.abspath(x) for x in sources]
+ elif isinstance(sources, basestring):
+ sources = os.path.abspath(sources)
self._build += " " + self.to_string(sources)
if 'deps' in kwargs and kwargs['deps'] :
self._build += " | " + self.to_string(kwargs["deps"])
Test-Information:
Running make clang-tidy spits out complaints about the code.
Change-Id: Ic9f43fd2e11ebd595b4b8a5cee8d290cd5349abf
|