aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorluis <luis>2007-08-08 05:23:12 +0000
committerluis <luis>2007-08-08 05:23:12 +0000
commit1027e31d8c291213b9984092361695d53b77440c (patch)
tree5ecbb9c27d567cbeba92bfc43b832922d5b36e99
parenta7c4f36e8c74d7674bba87c105dda0c83776e716 (diff)
downloadfirma-1027e31d8c291213b9984092361695d53b77440c.tar.gz
firma-1027e31d8c291213b9984092361695d53b77440c.tar.bz2
Message replay protection still not working. Fixed, I hope.
-rwxr-xr-xCHANGELOG2
-rwxr-xr-xfirma20
2 files changed, 15 insertions, 7 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 3eb664b..b271b2b 100755
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,7 +1,7 @@
Firma CHANGELOG
---------------
-08/08/2007 - 0.3-cvs (rev 1.175) - luis
+08/08/2007 - 0.3-cvs (rev 1.176) - luis
- Message replay protection wasn't working at all. Fixed.
diff --git a/firma b/firma
index 092eabb..15d72ee 100755
--- a/firma
+++ b/firma
@@ -1019,16 +1019,24 @@ function ProcessMessage {
fi
fi
else
- # the anti-replay mechanism detected a repeated message
- MESSAGE_BODY="\
+
+ # if bounce processing is enabled, continue
+ if [[ "$SILENTLY_DISCARD_INVALID_MESSAGES" != "1" ]]; then
+
+ GetSenderAddress
+ if [[ -n "$SENDER_ADDRESS" ]]; then
+
+ # the anti-replay mechanism detected a repeated message
+ MESSAGE_BODY="\
It was not possible to process this message. This list
is configured to discard replayed messages as an attack
protection measure. It looks like your message has been
sent to the list before and so it was discarded. Contact
the list administrator if you have any questions."
- ComposeAndSendBounceMessage
+ ComposeAndSendBounceMessage
+ fi
+ fi
fi
-
# else, message wasn't encrypted at all
# send a bounce, if possible
else
@@ -2430,9 +2438,9 @@ function ReplayProtectionCheck {
local -i return_code=0
local sha1
- if [[ "$REPLAY_PROTECTION" == "1" ]]; then
+ if [[ "$REPLAY_PROTECTION" == "1" && -n "$ORIG_GPG_MESSAGE" ]]; then
ReplayProtectionFlush
- sha1="$(echo "$GPG_MESSAGE" | sha1sum | cut -d " " -f 1)"
+ sha1="$(echo "$ORIG_GPG_MESSAGE" | sha1sum | cut -d " " -f 1)"
if grep -q "^$sha1$" $REPLAY_FILE; then
sed -i -e "/^$sha1$/d" $REPLAY_FILE
return_code=1