|Age||Commit message (Collapse)||Author|
Exceptions thrown by boost::numeric_cast are now caught and an assert
Unit tests pass on macOS 10.13
Apart from QtUI bits, this addresses use of uncaught numeric cast
exceptions in message count handling, the spell parser and the MacOS
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.
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.
Unit tests pass on macOS 10.14
Unit tests pass on Debian 9 and macOS 10.14
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.
Unit tests pass on macOS 10.13 using Expat and Debian 9 using LibXML
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.
Unit tests pass on macOS 10.13
LibIDNConverter was fixed to handle these restrictions
Added unit tests for RFC 1035 length restrictions for labels
and domain names.
The libidn and ICU backends pass the new test.
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
Unit tests pass on macOS 10.13
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.
Unit tests pass on macOS 10.13 and Debian 9
On macOS: tested the UI with various proxy and manual ports, behaviour
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.
Unit tests pass on macOS 10.13.
Manual tests in sluift show expected behaviour.
ICUConverter allowed jidparts greater than 1023 bytes during
The SConscript of StorageTest did not work when libidn had been
disabled, which prevented test=unit from completing.
Unit tests pass on Debian 9 in a build with ICU and ASan enabled.
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
Unit tests pass on macOS 10.13 and Debian 9
Before fix, the newly added unit tests triggered an ASan abort due to a
After fix, all unit tests pass, even with ASan enabled.
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.
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
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.
Unit tests passes, Swift still logins fine on macOS.
Builds and compiler warnings in not emitted by clang 8.0.0
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.
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.
Debug builds building with /MDd will otherwise fail on
Windows with MSVS 2015.
Builds successfully with /MDd flag on Windows using MSVS 2015.
Builds in default configuration on Windows 10 with MSVS 2015.
r literal is supported by both Python 2 and Python 3.
Builds on Windows 10 with Python 3 and VS 2015.
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
Unit tests pass on Debian 9
Test server code no longer crashes when it tries to set up a listener on
an invalid port.
This also has our scons patch in 3rdParty/SCons applied.
Builds with unit tests on macOS 10.13.6.
Builds, unit tests and integration tests pass on macOS with
clang 7.0 master.
Builds, unit and integration tests pass on macOS with
clang 7.0 master
Builds and unit tests pass on macOS with clang 7 master.
`./scons test=all` passes with no errors on macOS with clang
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.
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.
TLSLayer and TLSConnection now own the TLSContext they use.
The TLSContextFactory interface is adjusted to use
Builds and all tests pass on macOS with clang-7-master.
Done by adding --fix --fix-errors to the clang-tidy args in
Unit tests pass (macOS)
This doesn't address the issue in ChattablesTest that the
checks against 0 are being reported as checking null against 0
Fewer warnings after the change (macOS).
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
diff --git a/BuildTools/scons2ninja.py b/BuildTools/scons2ninja.py
index df4c6559d..13e78d650 100755
@@ -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]
+ 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"])
Running make clang-tidy spits out complaints about the code.
Ran ./BuildTools/scons2ninja.py check=1 build_examples=0, and it
generated a script that builds
and runs the checker, and that makes ninja -t compdb cxx spit out
things suitable for compile_commands.json
The new roster was temporarily resetting the model every
time there was a change, this patch sets it up properly
to use beginXxxRows, endXxxRows and dataChanged instead.
Unit test created to check the onBeginAdd and onAdded signals
get called at the correct time and that data is stored
properly when a JID is added. Also tested live on test server,
checked what happens when the user first logs in, and when
contacts log on and off.
There was some concern over the new setState function, and
its impact on populating the new roster on login. I ran
multiple tests, swift-4 vs swift-5 with the new roster,
I tested having 3000 users with and without presence in the
roster, 100 users and 3000 users split into 30 groups of 100.
We tested both the time to populate the roster (pre presence)
and the time from login until the roster become responsive
and usable. The results weren't terribly different between
swift-4 and swift-5 with the new roster, and swift-5 was
populating both the old and new rosters, therefore we concluded
that the new roster is not causing a significant slowing down
A new form submission dialog that will discover nodes containing
fdp form templates in a given pubsub domain, and will present the form
to the user ready to be filled out and submitted.
Personally tested the request for all node items, loading the
latest form from one of the discovered nodes, submitting a form
and checking it turns up on my mlink server using mlc, checked that
the submitted infomation is correct, what happens when an incorrect
domain is queried, what happens when a valid domain is queried but
it has no fdp nodes, and what happens when a form is requested from
an invalid node.
Unit tests written to test success and failure of the three controller
functions requestPubSubNodeData(), requestTemplateForm() and
Compiles now, didn't before (mac allow_warnings=0).
This patch implements a Model/View/Delegate for the multiple accounts a
user might have. The list is shown on the left of the client, with an
avatar, status presence and unread message counter. Mouse over a server
avatar will show the user jid that was used to connect to the server.
Server avatars are currently using the default Swift logo, server
information are not connected with the actual data, and the presence
icon is not being rendered. Future patches will improve this and connect
to the actual server data.
Tested the changes in the UI in Windows 10 Qt5.8 and Ubuntu 16.04 Qt
5.6. Tested the status change, login, logout and saving account
information during startup.
Added support for multiple accounts and a list of servers where the
user can switch between the accounts. Future patches will make the list
widget to use server avatars with user status.
Upon startup the client will reconnect with all previous accounts. If
the user log outs with any of the accounts then it will not login
automatically for future sessions, the credential though will be
available to the user. Upon upgrading from previous versions, the client
will migrate the account that was previously marked to auto-login to the
new configuration and enable it. After the migration the autologin
setting will be set to false.
Some of the settings and command line arguments have been made obsolete
due to these changes and removed, including SSO support, which will be
re-introduced in a future patch.
Tested the changes in Windows and Linux, tested adding and removing
accounts, and switching between them. Tested the new configuration for
accounts, the upgrade behaviour when an account is marked/not marked to
autojoin, and the migration to the new configuration. Verified that the
auto-login setting is set to false after the migration, and that the
migrated account can be disabled (currently only by signing out).
Everything else in the class uses underscore suffixes already.
Unit tests pass.
Without the recent fix for missing bookmark results, tests crash,
on master they pass
Before the patch, boom, after the patch, no boom.
(No boom today. Boom tomorrow. There's always a boom tomorrow)
For the upcoming update to Scons 3, which works with Python 2
and Python 3, this change makes our code compatible with
Python 3 so that it still works with Python 2.
Tested these changes with SCons 3.0.1 on macOS 10.13.6 with
Python 2.7.15 and Python 3.7.0.
This patch will add a leave room option in the cog menu of a MUC room,
allowing the user to leave the room and close the window.
Additionally when joining or leaving a room the autojoin field will change
to true or false respectively. This patch also fixes a minor issue with a
gui option that was not identifying bookmarked rooms at the cog menu.
The autojoin option on the Enter room, Bookmark room and Edit Bookmark
menu has been removed, since the default behaviour will be to
automatically bookmark every MUC room the user joins, setting autojoin to
true. If the user chooses to leave the room, then the autojoin flag will
be set to false and the bookmark will be updated.
Tested the changes in the UI in Windows Qt 5.9. Updated the
ChatsManagerTests unit tests to check the chattables and the behaviour
of the bookmarks, when joining and leaving MUCs.
Before this change, an IP literal would be attempted directly, and if
that failed it would then 'resolve' the literal and try the result.
Added a unit test verifying the bug before fixing it.
so that the swift-im openSUSE package builds in a reproducible way
in spite of indeterministic filesystem readdir order
See https://reproducible-builds.org/ for why this is good.
This patch is BSD licensed - see Documentation/Licenses/BSD-simplified.txt for details.
Builds on different machines should no longer have differences in Swiften.h
This includes removing the class QtChatTabsShortcutOnlySubstitute,
passing around QtChatTabs instead of QtChatTabsBase, removing checks
and casts relating to the possible use of either QtChatTabs or
QtChatTabsShortcutOnlySubstitute, checks to see if the splitter
exists as the splitter should now always exist.
Program still builds and runs fine. Both login and main windows open
and work correctly. Chat tabs open and close without fault. Unit tests
still pass. Removing loginWindowGeometry from the config file causes
Patch to add an underscore to the end of old QtUIFactory's
member variable names that are missing one.
Swift still builds and runs, no noticable problems logging in, chatting,
opening new chat tabs etc, no unit tests broke.
If swift has never been run in netbook mode before, then netbook
mode geometry is set by some hard coded default value during
construction of QtSingleWindow. The code to set and utilize the
original non-netbook mode geometry has been removed.
No unit tests as all changes at Qt specific.
Tested after deleting config file.
Tested after replacing config file with one that has no
SINGLE_WINDOW_XXX settings (so a config file you would find
if swift had never been opened in netbook mode).
Tested with one or other of the SINGLE_WINDOW_XXX settings
missing Tested with config file that contains all SINGLE_WINDOW_XXX