pontarius-xmpp 0.5.6.4 → 0.5.6.5
raw patch · 3 files changed
+7/−6 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
pontarius-xmpp.cabal view
@@ -1,6 +1,6 @@ Cabal-Version: 2.2 Name: pontarius-xmpp-Version: 0.5.6.4+Version: 0.5.6.5 Build-Type: Simple License: BSD-3-Clause License-File: LICENSE.md@@ -216,4 +216,4 @@ Source-Repository this Type: git Location: https://github.com/l29ah/pontarius-xmpp.git- Tag: 0.5.6.4+ Tag: 0.5.6.5
source/Network/Xmpp/Stream.hs view
@@ -37,7 +37,7 @@ import Data.XML.Pickle import Data.XML.Types import qualified GHC.IO.Exception as GIE-import Network.Socket hiding (Stream,connect)+import Network.Socket hiding (Closed, Stream, connect) import Network.DNS hiding (encode, lookup) import qualified Network.Socket as S import Network.Socket (AddrInfo)
source/Network/Xmpp/Types.hs view
@@ -1088,7 +1088,8 @@ guard $ Text.all (`Set.notMember` prohibMap) l'' l''' <- nonEmpty l'' return $ Just l'''- domainPart' <- forbidSeparators =<< SP.runStringPrep (SP.namePrepProfile False) (stripSuffix d)+ -- strip dots again to handle stuff like "⒐" until we are rfc7622+ domainPart' <- forbidSeparators . stripSuffix =<< SP.runStringPrep (SP.namePrepProfile False) (stripSuffix d) guard $ validDomainPart domainPart' guard $ validPartLength domainPart' domainPart <- nonEmpty domainPart'@@ -1108,8 +1109,8 @@ validPartLength :: Text -> Bool validPartLength p = Text.length p > 0 && BS.length (Text.encodeUtf8 p) < 1024- -- RFC6122 §2.2- stripSuffix t = if Text.last t == '.' then Text.init t else t+ -- RFC6122 §2.2; we strip ALL the dots to avoid looking for a fixed point and bailing out early+ stripSuffix = Text.dropWhileEnd (== '.') -- "/" might be a valid JID, but stringprep messes it up, so we use forbidSeparators t = if Nothing == Text.find (flip elem ['/', '@']) t then Just t else Nothing