summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2019-10-03Treat numeric domain JID as invalidJoanna Hulboj
DomainJID consisting of only numbers is not treated as valid. Test-information: Unit tests pass on Windows 10 and Ubuntu 18.04.1 LTS. Change-Id: If23ba8b8ea2a3c72d6f6e3acec4f587166c14e61
2019-05-28Add check if IPv4, IPv6 are valid JID domain partJoanna Hulboj
When creating a JID we were not checking if a domain part is a valid IPv4, IPv6 addresses. We were only checking if the domain is correct according to internationalized domain name rules which was failing for IPv6 addresses. Test-Information: Unit tests pass on Windows 10 and Ubuntu 18.04.1 LTS Change-Id: Ia1b67089f6edfdc6a0ebf2d26a7eaab9ce8171c0
2018-10-25Strip off trailing dot from domainpart of jidEdwin Mons
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
2018-10-10Remove JID prep caching from JID classTobias Markmann
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
2018-04-18Mark jids with an empty domainpart as invalidEdwin Mons
When Swiften parsed jids with an empty domainpart (e.g. user@/resource), it would mark the jid as valid, and treat the localpart as domainpart. RFC 6122 states in 2.2 that "A domainpart MUST NOT be zero bytes in length". Unit tests for both a bare jid and a full jid with an empty domainpart have been added. Test-Information: Unit tests pass on Debian 9 Change-Id: Iadaf399cd4158666bfcdd6c075b8bf2102ff5538
2016-06-22Treat JIDs with empty resources as invalidTobias Markmann
Cleaned up JID.cpp in process. Test-Information: Adjusted tests accordingly. All tests pass pass on OS X 10.11.5. Change-Id: I774344c8f7378dafe9249217503c082f46890457
2016-05-27Add presence to manually added contacts in 'Start Chat…' dialogTobias Markmann
This fixes a bug where manually added contacts, i.e. the user entered the address and hit the 'Add to list' button, were missing the correct presence in the contacts list in the 'Start Chat…" dialog. Test-Information: Tested on OS X 10.11.5 with Qt 5.4.2. Tested adding a roster member via the drop down suggestion and via manually entering the JID and clicking the 'Add to list' button. In both cases the correct presence was shown. Added a test verifying that empty JIDS are invalid. Change-Id: Idb18e4ad2b5c0afb48461796f64e8f11f02a24fd
2016-03-31Convert tabs to 4 spaces for all source filesTobias Markmann
Removed trailing spaces and whitespace on empty lines in the process. Changed CheckTabs.py tool to disallow hard tabs in source files. Test-Information: Manually checked 30 random files that the conversion worked as expected. Change-Id: I874f99d617bd3d2bb55f02d58f22f58f9b094480
2016-03-17Don't allow JIDs with explicitly empty resourcesKevin Smith
A JID may have no resource, but may not have an empty resource. Mark such JIDs as invalid. Test-Information: Added a unit test for the failure case (and made it pass). Other unit tests still pass Change-Id: I4fb300f716e635a3f8f02843891f25218da77130
2016-02-10Add more tests for JID validityKevin Smith
Test-Information: Tests pass locally (OS/X 10.11.3) Change-Id: I223cdf213f87a4efd574bdd917556aec23e4fd4c
2014-12-15Update Copyright in SwiftenKevin Smith
Change-Id: I94ab4bbb68c603fe872abeb8090575de042f5cb4
2014-08-10Fix invalid characters being allowed in JID domainsRichard Maudsley
Test-Information: Prepare valid and invalid JIDs and make sure that isValid() is reported correctly. Added unit tests. Change-Id: Ic4d86f8b6ea9defc517ada2f8e3cc54979237cf4
2013-07-27Use nodeprep for nodes and nameprep for domains.Kevin Smith
Change-Id: Iafe7f72aa2764c797fec736d4f5605c30254018a
2011-08-27Merge branch 'swift-1.x'Remko Tronçon
* swift-1.x: Update last used certificate file correctly. Mark JIDs with empty domains as invalid when StringPrep cache is disabled. Added StringPrep unit test.
2011-08-27Mark JIDs with empty domains as invalid when StringPrep cache is disabled.Remko Tronçon
We used to only do this correctly in the default compilation setting where the cache is enabled. Resolves: #965
2011-07-12Merge branch 'swift-1.x'Remko Tronçon
* swift-1.x: Fixed bug with illegal resource in JID resulting in empty resource. Updated the german translation Conflicts: Swiften/IDN/StringPrep.cpp Swiften/SASL/SCRAMSHA1ClientAuthenticator.cpp
2011-07-12Fixed bug with illegal resource in JID resulting in empty resource.Remko Tronçon
2011-05-22Fixed bug in JID escaping.Remko Tronçon
2011-04-30Replace #icnlude "" by #include <> in Swiften.Remko Tronçon
2011-04-18Added some more XEP-106 tests.Remko Tronçon
2011-04-18JID escaping algorithm refactoring.Remko Tronçon
Made algorithm more efficient. Fixed some incorrect escaping. Added more tests from the XEP.
2011-04-18Added support for JID Escaping XEP.Jan Kaluza
License: This patch is BSD-licensed, see http://www.opensource.org/licenses/bsd-license.php
2011-02-14Removed Swift::String.Remko Tronçon
2010-04-08Added copyrights to Swiften.Kevin Smith
2010-03-28Moving submodule contents back.Remko Tronçon
2010-03-28Removing submodules.Remko Tronçon
2010-03-28Moved Swiften to a separate module.Remko Tronçon
2009-06-01Import.Remko Tronçon