ספר המדות Improper Thoughts / Part II · יב
Sefer HaMiddot 804
יב. הִרְהוּרֵי עֲבוֹדָה זָרָה וְהִרְהוּרֵי זְנוּת וּשְׁפִיכוּת־דָּמִים וְלָשׁוֹן־הָרָע, הֵם בָּאִים עַל מִי שֶׁרָגִיל בִּנְדָרִים, אֲבָל נִתְבַּטְּלִים עַל־יְדֵי הַמַּנְהִיג שֶׁבָּעִיר, הַמְסַדֵּר הַגְּבִיּוֹת וְהַמִּסִּים עַל כָּל אֶחָד וְאֶחָד לְפִי עֶרְכּוֹ שֶׁיּוּכַל לִסְבּל.
12. Thoughts of idol worship, thoughts of immorality, bloodshed and evil speech come to someone who is accustomed to making vows, but they become nullified by the leader of the city, who arranges the fines and taxes upon each person, according to the amount that each one can handle.