version 0.3.15
[fms.git] / src / freenet / introductionpuzzlerequester.cpp
index f7d5317..66669b3 100644 (file)
@@ -112,6 +112,7 @@ const bool IntroductionPuzzleRequester::HandleAllData(FCPMessage &message)
 \r
                // we can only validate bitmaps for now\r
                BitmapValidator val;\r
+               val.SetMax(200,200);\r
                std::vector<unsigned char> puzzledata;\r
                Base64::Decode(xml.GetPuzzleData(),puzzledata);\r
                if(xml.GetMimeType()!="image/bmp" || val.Validate(puzzledata)==false)\r
@@ -265,7 +266,7 @@ void IntroductionPuzzleRequester::PopulateIDList()
        st.Finalize();\r
 \r
        // select identities that aren't single use, are publishing a trust list, and have been seen today ( order by trust DESC and limit to limitnum )\r
-       st=m_db->Prepare("SELECT IdentityID FROM tblIdentity WHERE PublishTrustList='true' AND PublicKey IS NOT NULL AND PublicKey <> '' AND SingleUse='false' AND LastSeen>='"+Poco::DateTimeFormatter::format(now,"%Y-%m-%d")+"' ORDER BY LocalMessageTrust DESC LIMIT 0,"+limitnum+";");\r
+       st=m_db->Prepare("SELECT IdentityID FROM tblIdentity WHERE PublishTrustList='true' AND PublicKey IS NOT NULL AND PublicKey <> '' AND SingleUse='false' AND (LocalTrustListTrust IS NULL OR LocalTrustListTrust>=(SELECT OptionValue FROM tblOption WHERE Option='MinLocalTrustListTrust')) AND LastSeen>='"+Poco::DateTimeFormatter::format(now,"%Y-%m-%d")+"' ORDER BY LocalMessageTrust DESC LIMIT 0,"+limitnum+";");\r
        st.Step();\r
 \r
        m_ids.clear();\r