From d181db064ee10c23f0f126f2feb0329ee2236d4c Mon Sep 17 00:00:00 2001 From: Thilo Cestonaro Date: Mon, 4 Jul 2011 08:53:55 +0200 Subject: Updated the german translation License: This patch is BSD-licensed, see http://www.opensource.org/licenses/bsd-license.php diff --git a/Swift/Translations/swift_de.ts b/Swift/Translations/swift_de.ts index f726573..6183099 100644 --- a/Swift/Translations/swift_de.ts +++ b/Swift/Translations/swift_de.ts @@ -5,319 +5,329 @@ - + Starting chat with %1% in chatroom %2% Beginne ein Gespräche mit %1% im Chatraum %2% - + Starting chat with %1% - %2% Beginne ein Gespräch mit %1% - %2% - + me Ich - + %1% has gone offline %1% ist offline gegangen - + %1% has become available %1% ist online gekommen - + %1% has gone away %1% ist nicht mehr am Rechner - + %1% is now busy %1% ist beschäftigt - + The day is now %1% Wir haben jetzt den Tag %1% - + + Couldn't send message: %1% + Konnte die Nachricht nicht senden: %1% + + + Error sending message Fehler beim Senden der Nachricht - + Bad request Fehlerhafter Aufruf - + Conflict Konflikt - + This feature is not implemented Diese Eigenschaft ist nicht implementiert - + Forbidden Verboten - + Recipient can no longer be contacted Der Empfänger ist nicht länger verfügbar - + Internal server error Interner Server Fehler - + Item not found Element nicht gefunden - + JID Malformed Jabber ID ist falsch formatiert - + Message was rejected Nachricht wurde zurückgewiesen - + Not allowed Nicht erlaubt - + Not authorized Nicht authorisiert - + Payment is required Bezahlung ist nötig - + Recipient is unavailable Empfänger nicht verfügbar - + Redirect Weiterleitung - + Registration required Registrierung nötig - + Recipient's server not found Server des Empfängers konnte nicht gefunden werden - + Remote server timeout Zeitüberschreitung beim entfernten Server - + The server is low on resources Der Server hat nur noch wenige Resourcen zur Verfügung - + The service is unavailable Dieser Service ist nicht verfügbar - + A subscription is required Ein Abonnement ist nötig - + Undefined condition Nicht definierter Zustand - + Unexpected request Unerwarteter Aufruf - + Room %1% is not responding. This operation may never complete. Der Chatraum %1% antwortet nicht. Diese Aktion wird wohl nie enden. - + Unable to enter this room Es ist nicht möglich diesem Chatraum beizutreten - + Unable to enter this room as %1%, retrying as %2% Es ist nicht möglich diesem Chatraum als %1% beizutreten, versuche es als %2% - + No nickname specified Nickname nicht angegeben - + A password needed Ein Passwort ist nötig - + Only members may enter Es dürfen nur Mitglieder eintreten - + You are banned from the room Du wurdest aus diesem Chatraum gebannt - + The room is full Der Chatraum ist voll - + The room does not exist Dieser Chatraum existiert nicht - + + Couldn't join room: %1%. + Konnte dem Raum nicht beitreten: %1%. + + + You have entered room %1% as %2%. Du hast den Chatraum %1% als %2% betreten. - + %1% has entered the room as a %2%. %1% hat den Chatraum als ein %2% betreten. - + %1% has entered the room. %1% hat den Chatraum betreten. - + moderator Moderator - + participant Teilnehmer - + visitor Gast - + The room subject is now: %1% Das Thema des Chatraumes ist nun: %1% - + %1% is now a %2% %1% ist nun ein %2% - + Moderators Moderatoren - + Participants Teilnehmer - + Visitors Gäste - + Occupants Besitzer - + Trying to enter room %1% Versuche in den Chatraum %1% einzutreten - - + + %1% has left the room %1% hat den Chatraum verlassen - + You have left the room Du hast den Chatraum verlassen - - + + and und - + %1% have entered the room %1% haben den Chatraum betreten - + %1% has entered the room %1% hat den Chatraum betreten - + %1% have left the room %1% haben den Chatraum verlassen - + %1% have entered then left the room %1% habe den Chatraum betreten und dann wieder verlassen - + %1% has entered then left the room %1% hat den Chatraum betreten und dann wieder verlassen - + %1% have left then returned to the room %1% haben den Chatraum verlassen und dann wieder betreten - + %1% has left then returned to the room %1% hat den Chatraum verlassen und dann wieder betreten @@ -332,157 +342,167 @@ Fehler - + + User address invalid. User address should be of the form 'alice@wonderland.lit' + Die Benutzerkennung ist falsch. Eine Benutzerkennung sollte wie z.B. 'alice@wonderland.lit' ausschauen + + + Unknown Error unbekannter Fehler - + Unable to find server Der Server kann nicht gefunden werden - + Error connecting to server Fehler beim Aufbau einer Verbindung zum Server - + Error while receiving server data Fehler beim Empfangen der Serverdaten - + Error while sending data to the server Fehler beim Senden der Daten zum Server - + Error parsing server data Fehler beim Einlesen der Serverdaten - + Login/password invalid Login oder Passwort ungültig - + Error while compressing stream Fehler beim Komprimieren des Datenstreams - + Server verification failed Überprüfung des Servers fehlgeschlagen - + Authentication mechanisms not supported Authentifizierungsmethoden werden nicht unterstützt - + Unexpected response Unerwartete Antwort - + Error binding resource Fehler beim Verknüpfen der Resourcen - + Error starting session Fehler beim Starten der Sitzung - + Stream error Stream Fehler - + Encryption error Verschlüsselungsfehler - + Error loading certificate (Invalid password?) Fehler beim Laden des Zertifikates (falsches Passwort?) - + Certificate not authorized Zertifikat nicht authorisiert - + Unknown certificate Unbekanntes Zertifikat - + Certificate has expired Zertifikat ist abgelaufen - + Certificate is not yet valid Zertifikat noch nicht gültig - + Certificate is self-signed Zertifikat ist selbst signiert - + Certificate has been rejected Zertifikat wurde zurückgewiesen - + Certificate is not trusted Zertifikat wird nicht vertraut - + Certificate cannot be used for encrypting your connection Zertifikat kann nicht zum Verschlüsseln der Verbindung genutzt werden - + Certificate path length constraint exceeded Zertifikatpfadlängenbeschränkung überschritten - + Invalid certificate signature Ungültige Zertifikatssignatur - + Invalid Certificate Authority Ungültige Zertifizierungsstelle - + Certificate does not match the host identity Zertifikat stimmt nicht mit der Hostidentität überein - + Certificate error Zertifikatsfehler - + + Disconnected from %1%: %2%. To reconnect, Sign Out and provide your password again. + Verbindung zu %1% wurde getrennt: %2%. Bitte ausloggen und nochmal einloggen um die Verbindung wieder aufzubauen. + + + Reconnect to %1% failed: %2%. Will retry in %3% seconds. Erneutes Verbinden zu %1% fehlgeschlagen: %2%. Es wird in %3% Sekunden erneut versucht zu verbinden. - + Disconnected from %1%: %2%. Verbindung zu %1% getrennt: %2%. @@ -525,6 +545,21 @@ There was an error publishing your profile data Es ist ein Fehler während der Veröffentlichung deiner Profildaten aufgetreten + + + %1% (%2%) + %1% (%2%) + + + + %1% and %2% others (%3%) + %1% und %2% andere (%3%) + + + + %1%, %2% (%3%) + %1%, %2% (%3%) + CloseButton @@ -682,6 +717,14 @@ %1 would like to add you to their contact list, saying '%2' %1 möchte dich zu seiner/ihrer Kontaktliste hinzufügen, sein/ihr Kommentar dazu war: '%2' + + Systray + Infobereich + + + No system tray + Kein Infobereich (Systemtray) verfügbar + QScrollBar @@ -1059,10 +1102,15 @@ Swift::ChatListModel - + Bookmarked Rooms Chatraum-Lesezeichen + + + Recent Chats + Kürzliche Gespräche + Swift::QtAboutWidget @@ -1100,6 +1148,44 @@ + Swift::QtAdHocCommandWindow + + + Cancel + Abbrechen + + + + Back + Zurück + + + + Next + Weiter + + + + Complete + Fertig + + + + Error: %1 + Fehler: %1 + + + + Warning: %1 + Warnung: %1 + + + + Error executing command + Fehler beim Ausführen des Kommandos + + + Swift::QtAvatarWidget @@ -1153,18 +1239,18 @@ Swift::QtChatListWindow - - + + Add New Bookmark Neues Lesezeichen hinzufügen - + Edit Bookmark Lesezeichen editieren - + Remove Bookmark Lesezeichen entfernen @@ -1172,37 +1258,46 @@ Swift::QtChatView - + Clear log Aufzeichnung löschen - + You are about to clear the contents of your chat log. Du bist dabei die Gesprächsaufzeichung zu löschen. - + Are you sure? Bist du dir sicher? + + + %1 edited + %1 editiert + Swift::QtChatWindow - + + Correcting + verbessern + + + This message has not been received by your server yet. Die Nachricht wurde noch nicht von deinem Server empfangen. - + This message may not have been transmitted. Die Nachricht scheint nicht versandt worden zu sein. - Couldn't send message: %1 - Konnte die Nachricht nicht senden: %1 + Konnte die Nachricht nicht senden: %1 @@ -1303,7 +1398,7 @@ - + Connect Verbinden @@ -1353,42 +1448,42 @@ &Beenden - + Remove profile Profil entfernen - + Remove the profile '%1'? Das Profil '%1' entfernen? - + Cancel Abbrechen - + Select an authentication certificate Wähle ein Authentifizierungszertifikat - + The certificate presented by the server is not valid. Das Serverzertifikat ist nicht gültig. - + Would you like to permanently trust this certificate? This must only be done if you know it is correct. Willst du diesem Zertifikat permanent Vertrauen? Das darf nur der Fall sein, wenn du genau weißt, dass es korrekt ist. - + Subject: %1 Betreff: %1 - + SHA-1 Fingerprint: %1 SHA-1 Fingerabdruck: %1 @@ -1405,66 +1500,81 @@ Swift::QtMainWindow - + &Contacts &Kontakte - - + + &Notices H&inweise - + C&hats C&hats - + &View A&nsicht - + &Show offline contacts &Offline-Kontakte anzeigen - + &Actions &Aktionen - + Edit &Profile &Profil editieren - + Enter &Room Chat&raum betreten - + &Add Contact Kont&akt hinzufügen - + &Edit Selected Contact Ausgewählten Kontakt &editieren - + Start &Chat Gesprä&ch beginnen - + + Run Server Command + Server Kommando ausführen + + + &Sign Out A&bmelden + + + Collecting commands... + Verfügbare Kommandos werden abgerufen... + + + + No Available Commands + Keine Kommandos verfügbar + Swift::QtNameWidget @@ -1658,6 +1768,16 @@ Wenn du dich jetzt noch nicht festlegen willst, wirst du beim nächsten Einlogge Clear Leeren + + + Increase font size + Schriftgröße erhöhen + + + + Decrease font size + Schriftgröße verringern + Swift::QtXMLConsoleWidget -- cgit v0.10.2-6-g49f6 From 08536b4ed31c30a25a343c3c2619676e67a0c692 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Remko=20Tron=C3=A7on?= Date: Tue, 12 Jul 2011 20:43:33 +0200 Subject: Fixed bug with illegal resource in JID resulting in empty resource. diff --git a/Swiften/IDN/StringPrep.cpp b/Swiften/IDN/StringPrep.cpp index ff01eed..d54fb0b 100644 --- a/Swiften/IDN/StringPrep.cpp +++ b/Swiften/IDN/StringPrep.cpp @@ -26,14 +26,13 @@ const Stringprep_profile* getLibIDNProfile(StringPrep::Profile profile) { } std::string StringPrep::getPrepared(const std::string& s, Profile profile) { - std::vector input(s.begin(), s.end()); input.resize(MAX_STRINGPREP_SIZE); if (stringprep(&input[0], MAX_STRINGPREP_SIZE, static_cast(0), getLibIDNProfile(profile)) == 0) { return std::string(&input[0]); } else { - return ""; + throw std::exception(); } } diff --git a/Swiften/JID/JID.cpp b/Swiften/JID/JID.cpp index e4611b3..925c763 100644 --- a/Swiften/JID/JID.cpp +++ b/Swiften/JID/JID.cpp @@ -29,24 +29,25 @@ static PrepCache resourcePrepCache; namespace Swift { -JID::JID(const char* jid) { +JID::JID(const char* jid) : valid_(true) { initializeFromString(std::string(jid)); } -JID::JID(const std::string& jid) { +JID::JID(const std::string& jid) : valid_(true) { initializeFromString(jid); } -JID::JID(const std::string& node, const std::string& domain) : hasResource_(false) { +JID::JID(const std::string& node, const std::string& domain) : valid_(true), hasResource_(false) { nameprepAndSetComponents(node, domain, ""); } -JID::JID(const std::string& node, const std::string& domain, const std::string& resource) : hasResource_(true) { +JID::JID(const std::string& node, const std::string& domain, const std::string& resource) : valid_(true), hasResource_(true) { nameprepAndSetComponents(node, domain, resource); } void JID::initializeFromString(const std::string& jid) { if (String::beginsWith(jid, '@')) { + valid_ = false; return; } @@ -72,31 +73,40 @@ void JID::initializeFromString(const std::string& jid) { void JID::nameprepAndSetComponents(const std::string& node, const std::string& domain, const std::string& resource) { + try { #ifndef SWIFTEN_CACHE_JID_PREP - node_ = StringPrep::getPrepared(node, StringPrep::NamePrep); - domain_ = StringPrep::getPrepared(domain, StringPrep::XMPPNodePrep); - resource_ = StringPrep::getPrepared(resource, StringPrep::XMPPResourcePrep); + node_ = StringPrep::getPrepared(node, StringPrep::NamePrep); + domain_ = StringPrep::getPrepared(domain, StringPrep::XMPPNodePrep); + resource_ = StringPrep::getPrepared(resource, StringPrep::XMPPResourcePrep); #else - std::pair r; + std::pair r; - r = nodePrepCache.insert(std::make_pair(node, std::string())); - if (r.second) { - r.first->second = StringPrep::getPrepared(node, StringPrep::NamePrep); - } - node_ = r.first->second; + r = nodePrepCache.insert(std::make_pair(node, std::string())); + if (r.second) { + r.first->second = StringPrep::getPrepared(node, StringPrep::NamePrep); + } + node_ = r.first->second; - r = domainPrepCache.insert(std::make_pair(domain, std::string())); - if (r.second) { - r.first->second = StringPrep::getPrepared(domain, StringPrep::XMPPNodePrep); - } - domain_ = r.first->second; + r = domainPrepCache.insert(std::make_pair(domain, std::string())); + if (r.second) { + r.first->second = StringPrep::getPrepared(domain, StringPrep::XMPPNodePrep); + } + domain_ = r.first->second; + if (domain_.empty()) { + valid_ = false; + return; + } - r = resourcePrepCache.insert(std::make_pair(resource, std::string())); - if (r.second) { - r.first->second = StringPrep::getPrepared(resource, StringPrep::XMPPResourcePrep); - } - resource_ = r.first->second; + r = resourcePrepCache.insert(std::make_pair(resource, std::string())); + if (r.second) { + r.first->second = StringPrep::getPrepared(resource, StringPrep::XMPPResourcePrep); + } + resource_ = r.first->second; #endif + } + catch (const std::exception&) { + valid_ = false; + } } std::string JID::toString() const { diff --git a/Swiften/JID/JID.h b/Swiften/JID/JID.h index 63e063d..1a7dbe3 100644 --- a/Swiften/JID/JID.h +++ b/Swiften/JID/JID.h @@ -22,7 +22,7 @@ namespace Swift { JID(const std::string& node, const std::string& domain, const std::string& resource); bool isValid() const { - return !domain_.empty(); /* FIXME */ + return valid_; } const std::string& getNode() const { @@ -79,6 +79,7 @@ namespace Swift { void initializeFromString(const std::string&); private: + bool valid_; std::string node_; std::string domain_; bool hasResource_; diff --git a/Swiften/JID/UnitTest/JIDTest.cpp b/Swiften/JID/UnitTest/JIDTest.cpp index 0f22e15..f406635 100644 --- a/Swiften/JID/UnitTest/JIDTest.cpp +++ b/Swiften/JID/UnitTest/JIDTest.cpp @@ -23,6 +23,7 @@ class JIDTest : public CppUnit::TestFixture CPPUNIT_TEST(testConstructorWithString_UpperCaseDomain); CPPUNIT_TEST(testConstructorWithString_UpperCaseResource); CPPUNIT_TEST(testConstructorWithString_EmptyNode); + CPPUNIT_TEST(testConstructorWithString_IllegalResource); CPPUNIT_TEST(testConstructorWithStrings); CPPUNIT_TEST(testIsBare); CPPUNIT_TEST(testIsBare_NotBare); @@ -124,6 +125,12 @@ class JIDTest : public CppUnit::TestFixture CPPUNIT_ASSERT(!testling.isValid()); } + void testConstructorWithString_IllegalResource() { + JID testling("foo@bar.com/\xd8\xb1\xd9\x85\xd9\x82\xd9\x87\x20\xd8\xaa\xd8\xb1\xd9\x86\xd8\xb3\x20"); + + CPPUNIT_ASSERT(!testling.isValid()); + } + void testConstructorWithStrings() { JID testling("foo", "bar", "baz"); diff --git a/Swiften/SASL/SCRAMSHA1ClientAuthenticator.cpp b/Swiften/SASL/SCRAMSHA1ClientAuthenticator.cpp index 2dd7bf4..33de014 100644 --- a/Swiften/SASL/SCRAMSHA1ClientAuthenticator.cpp +++ b/Swiften/SASL/SCRAMSHA1ClientAuthenticator.cpp @@ -99,7 +99,11 @@ bool SCRAMSHA1ClientAuthenticator::setChallenge(const boost::optional } // Compute all the values needed for the server signature - saltedPassword = PBKDF2::encode(StringPrep::getPrepared(getPassword(), StringPrep::SASLPrep), salt, iterations); + try { + saltedPassword = PBKDF2::encode(StringPrep::getPrepared(getPassword(), StringPrep::SASLPrep), salt, iterations); + } + catch (const std::exception&) { + } authMessage = getInitialBareClientMessage() + "," + initialServerMessage + "," + getFinalMessageWithoutProof(); ByteArray serverKey = HMACSHA1::getResult(saltedPassword, "Server Key"); serverSignature = HMACSHA1::getResult(serverKey, authMessage); @@ -146,7 +150,12 @@ std::map SCRAMSHA1ClientAuthenticator::parseMap(const std::st } ByteArray SCRAMSHA1ClientAuthenticator::getInitialBareClientMessage() const { - std::string authenticationID = StringPrep::getPrepared(getAuthenticationID(), StringPrep::SASLPrep); + std::string authenticationID; + try { + authenticationID = StringPrep::getPrepared(getAuthenticationID(), StringPrep::SASLPrep); + } + catch (const std::exception&) { + } return ByteArray(std::string("n=" + escape(authenticationID) + ",r=" + clientnonce)); } -- cgit v0.10.2-6-g49f6