summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2016-01-21Ensure that BoostTimers can't fire after stop()Kevin Smith
Code review makes me think that if the timer fires at the same time as stop() is called, it would be possible for the clearing of events from the loop to happen before the event is put into the loop, leading to the sort of crashes we've seen with timers firing and access exceptions. I can't reproduce those to know if this fixes them, and I'm not even sure I'm not being dense thinking this patch fixes a real issue. Test-Information: Unit tests pass Change-Id: I76337d5556a9c3902d5c2f4da754ae657810d436
2016-01-21Stop timer during clean up of WhitespacePingLayerTobias Markmann
AddressSanitizer reported a heap-buffer-overflow in WhitespacePingLayer::handleTimerTick() which happened during multiple restarts of a XMPP server. Under the assumption that it was caused by not correctly stopping the timer, the timer is now explicitly stopped if still active at destruction. Test-Information: Unable to reproduce the ASAN report. Unit tests still pass. Change-Id: Ia0b7c3b613688750c4ce0ad40d759a0db4a52791
2016-01-19Reset impromptu support flag when logging offTobias Markmann
Test-Information: Added unit test verifying the expected behavior. It passes on OS X 10.11.2. Change-Id: I7531e313bf03dbea276f133db042ce26e6da4a53
2016-01-18Remove unused variable reported by GCCTobias Markmann
Test-Information: Unit tests pass on Debian 8. Change-Id: I648f97a3ebd2c798df809a1f2cb37b689df94f42
2016-01-16Remove warning about undefined QTDIR environment variableTobias Markmann
It used to be a common way to use the QTDIR environment variable to tell SCons the location of the Qt installation on the system. Swift however uses the 'qt' SCons config variable for the location and the 'qt5' variable for the version of Qt to use. On Unix/Linux systems with pkg-config, SCons will use it to detect the Qt installation and its flags. The QTDIR environment variable is rarely used and tested so the warning about missing environment variable is removed. Test-Information: Tested on Debian 8. Change-Id: I2cd793f12b8607743db2848765011cc719b106aa
2016-01-15Silence Boost Signals deprecation warning if using system BoostTobias Markmann
Test-Information: Tested on Debian 8 with system Boost packages. Change-Id: Ice6a98dc8ba3f09502d79e704c3e1b744d829d5d
2016-01-15Free file-transfer objects before removing files in QA toolTobias Markmann
FileTransferTest would attempt to remove files while the file-transfer objects still have a file handle open to them in form of FileReadBytestream and FileWriteBytestream references. Test-Information: ./scons test=system Swiften/QA/FileTransferTest passed successfully on Windows 8. Change-Id: Iba45fa5df7e6f55667dd76fee4624733bb363fe5
2016-01-15Add missing virtual keyword to some destructorsTobias Markmann
Adds missing virtual keyword to destructors of classes which have a non-empty destructor and are inheriting from other classes and implement virtual functions. Test-Information: Compiles and unit tests pass on Windows 8 with VS 2013. Change-Id: I172b5de8eda63eb8057113fbc979444abde3e0a7
2016-01-15Always link secur32.lib to Swiften on WindowsTobias Markmann
Even when using the OpenSSL TLS backend for Swiften secur32.lib is required by Swiften/SASL/WindowsAuthentication. This also adds additional flags needed to build a bundled OpenSSL on Windows. Test-Information: Tested on Windows 8 with VS 2013. Change-Id: I51da79cfa7931c07c8da3f0c5d941a637ac26d0c
2016-01-12Listen to IPv6 any address instead of only IPv4Tobias Markmann
This should enable IPv4/IPv6 dual-stack support for Swift(-en) Jingle file-transfer support. Add Connection::getRemoteAddress() method. Test-Information: Tested IPv6 file-transfer and IPv4 file-transfer between two Swift instances. Added integration test verifying IPv4 only, IPv6 only and IPv4/IPv6 dual-stack support on the running platform. Additionally added test to verify remote addresses on dual-stack server. Change-Id: Ie384a71833eacca554f69e6f12a1c8330d0d747f
2016-01-11Fix IPv6 DNS resolution issues on WindowsTobias Markmann
Use values instead of define names for _WIN32_WINNT and NTDDI_VERSION defined needed for Windows.h configuration. Using the names boost fails to correctly detect getaddrinfo() support on Windows. Only run IPv6 related test cases in DomainNameResolverTest on Windows, if test_ipv6=1 is passed to the scons arguments. This is because on Windows getaddrinfo() will not return IPv6 related results when called with the AF_UNSPEC hint, unless the Windows host has global IPv6 connectivity. Changed the BoostConnectionTest to time out and not endlessly wait on a response from the remote host. Test-Information: Ran the following test configurations: * (SUCCESS) On Windows 8 with HE.net IPv6 tunnel to provide full IPv6 connectiviy: scons.bat test=system test_ipv6=1 Swiften/QA/NetworkTest * (SUCCESS) On Windows 8 with HE.net IPv6 tunnel to provide full IPv6 connectiviy: scons.bat test=system Swiften/QA/NetworkTest * (EXPECTED FAIL) On Windows 8 with no IPv6 connectiviy: scons.bat test=system test_ipv6=1 Swiften/QA/NetworkTest * (SUCCESS) On Windows 8 with no IPv6 connectiviy: scons.bat test=system Swiften/QA/NetworkTest Change-Id: I5adcd28e09e22acf61f7cca40b614e71df75dd70
2016-01-07Add file extension to star-unchecked.png referenceTobias Markmann
This change is just for consistency and does not change the behavior. Test-Information: Checked and uncheck star still works in vCard. Change-Id: Ib6597b48cec9d3498611524c9a97fce62811ec02
2016-01-07Remove wrong assertion in BoostIOServiceThreadTobias Markmann
Test-Information: Builds and unit and system tests succeed on OS X 10.11.2. Change-Id: I9e4805f31c4ba63c64d73dbfc2ee6b6423d949a8
2016-01-07Default to Qt5 for building SwiftTobias Markmann
Updated documentation accordingly. Test-Information: Build and ran unit tests on OS X 10.11.2. Change-Id: Iec4e82d3b63a6b0d24b854734879dd2fbfe17d79
2016-01-06Add Michael Vetter to COPYING.thirdpartyTobias Markmann
Test-Information: None. Change-Id: I249a039730f897b4830597af61aca51b97f6310a
2016-01-06Add openSUSE to InstallSwiftDependencies scriptMichael Vetter
License: This patch is BSD-licensed, see Documentation/Licenses/BSD-simplified.txt for details. Change-Id: I31a731d0fb5142f1ec23c5c2e9f0ca60f5f9a288
2015-12-17Do not consult presence oracle for MUC PM presenceTobias Markmann
Test-Information: Added unit test verifying the behavior. Verified with multiple Swift instances in a MUC room that for MUC PMs only the same full JID presence counts. Change-Id: I08148221be34c3548f18da634586c828fd60feff
2015-12-173rdParty fixes to enable compatibility with VS 2015Tobias Markmann
Included patches for future reference. Test-Information: Tested patches with VS 2015 Community and unit tests for 32 bit and 64 bit builds. Change-Id: Ifa8d0ca3bf33010af8d8094c6df45f2a5702976c
2015-12-17Fix misspelled method callTobias Markmann
Test-Information: Builds and tests pass. Change-Id: I7c12036903ea535fe0a7ee7085b2268894c546bd
2015-12-17Show file-transfer description if providedTobias Markmann
Test-Information: Tested by transferring a file between two Swift instances. Tested in WebKit chat views and in plain chat views. Change-Id: Ie46cbd7bac8a36478f64b4557cf55926e6d4af37
2015-12-17Update SCons to version 2.4.0Tobias Markmann
Test-Information: Tested build works with upcoming fixes with VS 2015 Community. Change-Id: Ia4f78cc9efdae56ef78a2b7ae09f11fa1bd8bc37
2015-12-17Process multiple events at once inside EventLoopTobias Markmann
Test-Information: Unit and integration tests pass on OS X 10.10.5 and Debian 8.2. UI remains responsive when transferring a file between two Swift instances. Change-Id: I7841347a5d6c55121e02e274a7087a2fc200f879
2015-12-17Do not advertise link-local IPv6 addresses in FT candidatesTobias Markmann
Test-Information: Ran a file-transfer between two Swift instances and verified no fe80:... addresses are included in the candidates. Change-Id: I51dedb6aff95686764f74bf61ab2963e51ecbd1c
2015-12-17Add test verifying Boost ASIO IPv4/IPv6 dual-stack socket supportTobias Markmann
Test-Information: Tested on OS X 10.11.1. Change-Id: If63370404ac6586e2e48a19cbe7a0f0df9359c36
2015-12-17Disconnect signals from in-flight IBB requestTobias Markmann
Canceling an IBB transfer in-flight caused an use-after-free reported by ASAN. With this fix we keep a reference of the current request around to be able to disconnect from its signals on cancel. Test-Information: Transferred a file with Swift using the IBB method and canceled the transfer. The previously error reported by ASAN is gone. Change-Id: I240d3dbb59cddb6b91d49f268595a89ac8805f72
2015-12-17Only calculate S5B candidates if supported by recipientTobias Markmann
Test-Information: Tested against a Swift instance which does not advertise the DiscoInfo::JingleTransportsS5BFeature feature and verified via debug console that only the IBB feature is listed in the candidates. Change-Id: I708c437f5c30c16c3478fd3448d7cb9592e68677
2015-12-17Remove superfluous member in ChatsManagerTobias Markmann
Added missing signal disconnects in UserSearchController. Test-Information: All unit tests pass. Change-Id: I13fba64d40f7999c3d2196ad2917ff22392f72b3
2015-12-17Add event loop for integration in Boost ASIOKevin Smith
This allows execution of events inside an existing io_service if an application is already using Boost ASIO for other things and can share the io_service. Test-Information: Builds on OS X 10.11.2. Change-Id: I092ed7a25b24ef95d4664bae98ed84cc0f149073
2015-12-16Fix crash related to removal of contactsTobias Markmann
Test-Information: Added test@example.com contact and removed it afterwards. Without this patch Swift crashed. With the patch it does not anymore. Change-Id: I09e93340cb0a23291ab094a4cdb7c79ef719645a
2015-11-30Workaround QTabBar early eliding bug on OS XTobias Markmann
The issue is visible when having two chat windows with the same label. One of them is elided even though enough horizontal space is available. Test-Information: Tested multiple chats including some with the same tab label. Tested many open chat windows overflowing the horizontal space of the tab bar to test scroll behavior on overflow. Verified that the code stops the early eliding bug on OS X 10.10.5 with Qt 5.4.2. Verified that workaround is not needed on Debian 8.2 with Qt 5.4.2. Change-Id: I2dc0d417fb6f402dda2f7575a83ca3faf4eb63cf
2015-11-28Close 'Edit Profile'-dialog on sign outTobias Markmann
Test-Information: Tested going offline and signing out on OS X 10.10.5. Change-Id: I307c318e8b22a62473df142e94d6895490ea2e2d
2015-11-26Request redraw of recent chats on compactness changeTobias Markmann
Test-Information: Verified UI in the 'Chats' tab is directly updated after compactness change on Debian 8.2. Change-Id: I20fcf863983ff206be4cb427d4d77bd42f23e53e
2015-11-25Fix Ctrl + Tab shortcut when MUC contact list is selectedTobias Markmann
This also fixes the issue of Ctrl + Backtab moving two tabs back on Windows. Test-Information: Tested on Debian 8.2 with Gnome 3 and Qt 5.3.2, OS X 10.10.5 with Qt 5.4.2 and Windows 8 with Qt 5.4.2. Verified that Ctrl + Tab works correctly. Verified that Ctrl + Tab works correctly when the chat room contact list is selected. Verified that Ctrl + Backtab works correctly. Change-Id: I9e461d741a399aed59142505e29c03cebe26097e
2015-11-19Redesign event loops to be thread-safe and deterministicTobias Markmann
The new event loop design has a single event queue that is synchronized to protect against data races. The removal of events in the queue by EventOwner is deterministic. Test-Information: All unit and integration tests with TSAN and cxxflags=-DBOOST_SP_USE_PTHREADS on Debian 8.2 pass without reports. Multiple Swiften/QA/ClientTest/ClientTest runs under different CPU stress caused no TSAN reports on Debian 8.2. Swift itself only causes TSAN reports related to Qt itself, out of our control, and most likely false positives, i.e. TSAN not detecting the synchronization method inside Qt correctly. Unit tests pass without errors and successfully connected to Slimber on OS X 10.10.5. Change-Id: Ia1ed32ac2e758c5b9f86e0dac21362818740881e
2015-11-18Fix virtual destructors and mismatching signal disconnectionTobias Markmann
Test-Information: Unit tests pass on OS X 10.10.5. Change-Id: I7b505513b4342001596ee8518bfdcf9e77c91479
2015-11-11Fix sluift API for clearing certificateGurmeen Bindra
Before this patch it was calling the constructor and creating certificate object with empty string. This was causing tests to fail when client was set with null certificate. This object fixes it by setting the certificate object to Null if the certificate file is empty. Test-information: Test cases using sluift with this API that set null certificate now pass Change-Id: Id75e22b58afebb2db463a7a23a4ca0686ef6eb12
2015-11-11Break out of .deb packaging on errorKevin Smith
Test-Information: Ran the script until it started building (then cancelled it). Change-Id: I803f8aae2b042dea9870491dfd46bbc5a6fd88f6
2015-11-11Update .deb platformsKevin Smith
Test-Information: Built using the script Change-Id: Id4f6dd0d36e975341b5b30298db4541fbe018b2e
2015-11-10Add support for client certificate authentication in BOSHTobias Markmann
This allows to authenticate using SASL EXTERNAL over BOSH using a client TLS certificate for the HTTPS connection of the BOSH channel. The implementation also enforces the HTTPS server certificate of subsequent BOSH connections not to change. This commit also removes TLSConnection and TLSConnectionFactory as no code is using them. Test-Information: Tested against M-Link 16.3v6-0 on Debian 7.9 and Swift on OS X 10.10.5. Verified working client certificate authentication. Verified Swift not falling back to password-based authentication, in case EXTERNAL is not allowed by the server over BOSH or the client certificate is invalid. Change-Id: Ia96bcac27cac9fc9261ed847c82c6328307bfbd1
2015-11-10Update .deb packaging for Qt5Kevin Smith
Test-Information: Generated (unsigned) debs on Ubuntu 15.10 Change-Id: Ibacee5d63c0662d2a9cfbc61e0d0f2c48fd93736
2015-11-10Fix Cocoa memory management error in Secure Transport backendTobias Markmann
The code was calling CFRelease on a null pointer, which runs into an assert inside CFRelease. Test-Information: The crash happened during client certificate authentication using the Secure Transport backend. With this patch the crash is gone. Change-Id: If389dcb8b8a20fdc5cf77219d6c5afb86c9c3634
2015-11-10Fix certificate-less login in SwiftTobias Markmann
Commit 8405fa1 changed the client certificate handling inside Swiften to not fallback to certificate-less authentication if there is an error. This commit fixes Swift to only pass a certificate during login if a file is set and the user wants to authenticate using client certificates. Test-Information: Tested certificate-less login (worked). Tested certificate-based login (worked). Tested certificate-based login with deleted certificate file (correct error reported). Change-Id: I3b1393688c4802abfd7f66b7cb49ddd8c518e62b
2015-11-09Improve QtTextEdit::sizeHint() for symmetric vertical paddingTobias Markmann
Test-Information: Verified UI under OS X 10.10.5 and Debian 8.2. Change-Id: Ifaf063eed06f51c94d4103c5397187e62035fb90
2015-11-09Change virtual calls in ctors/dtors to be explicitTobias Markmann
Test-Information: Still builds and tests pass on OS X 10.10.5. Change-Id: Ic616e7b9de443ce34b46de63ac1bb0cca34b08ee
2015-11-09Fix a syntax error in InstallSwiftDependencies.shKevin Smith
Thanks to https://github.com/damianb-03. Test-Information: Inspection Change-Id: I68de7fe5c3206dd24dc6443e6bf54e881e9c5b6a
2015-11-09Change Windows to Unix line endingsTobias Markmann
Test-Information: Still builds and tests pass. Change-Id: I040423ab6f6934610e336f3af22d174a685af66a
2015-11-06Making virtual calls in constructor of ChatControllers explicitTobias Markmann
Virtual calls in ctors/dtors are tricky as it is not clear what method is going to be called. By changing the code to call the explicit method it is obvious. This issue was raised by Clang Analyzer. This commit also adds missing SWIFTEN_OVERRIDE annotations. Test-Information: Still compiles, tests pass and Clang Analyzer warning so gone. Change-Id: I8096994277ad32933f992b9a11079c761d3ec619
2015-11-06Make methods non-virtual that are not overridden by subclassTobias Markmann
These cases have been uncovered by Clang Analyzer as they were called during some constructor. However, there is no reason for them being virtual. They are never overridden in a derived class. Test-Information: Unit tests still pass on OS X 10.10.5. Change-Id: I90b5396a0dba971d9150c35f9107733f7f4637cd
2015-11-06Fix potential memory leaks in Cocoa API usageTobias Markmann
These errors were reported by Clang Analyzer. Test-Information: Verified that behavior is still as expected and Clang Analyzer does not report the warnings anymore. Change-Id: I149d75241f7680a6d2f2b6b710dd38d1ed81a209
2015-11-04Fix swiften handling when client certificate is missingGurmeen Bindra
This patch prevents SWIFTEN from logging in if provided with a missing PKCS12 file. Before this patch, swiften would attempt a password based login using operator JID and pwd of the P12 file when the P12 file was missing. This patch fixes it by checking the certificate and not initialising session stream and connection if the certificate is empty. It emits a disconnect with client certificate load error. The string for certificate load error has been modified to indicate a file or password invalid. Test-information: Tested by doing a certificate based bind to an XMPP server. Removed the PKCS#12 file and checked that swift gave a certificate error instead of doing pwd connect Change-Id: I1869a13f1f7135b6606f7383cd4a0356ffd6931b