This is an automated email from the ASF dual-hosted git repository.
btellier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git
The following commit(s) were added to refs/heads/master by this push:
new 9e62e8e4d2 [FIX] Reject non strictly positive POP3 indexes (#2575)
9e62e8e4d2 is described below
commit 9e62e8e4d2299934bff0914287edcd9b42e8b2eb
Author: Benoit TELLIER <[email protected]>
AuthorDate: Fri Dec 20 08:40:17 2024 +0100
[FIX] Reject non strictly positive POP3 indexes (#2575)
---
.../apache/james/protocols/pop3/core/POP3MessageCommandDelegate.java | 3 +++
1 file changed, 3 insertions(+)
diff --git
a/protocols/pop3/src/main/java/org/apache/james/protocols/pop3/core/POP3MessageCommandDelegate.java
b/protocols/pop3/src/main/java/org/apache/james/protocols/pop3/core/POP3MessageCommandDelegate.java
index ec2f84e18f..b3364a4025 100644
---
a/protocols/pop3/src/main/java/org/apache/james/protocols/pop3/core/POP3MessageCommandDelegate.java
+++
b/protocols/pop3/src/main/java/org/apache/james/protocols/pop3/core/POP3MessageCommandDelegate.java
@@ -72,6 +72,9 @@ public abstract class POP3MessageCommandDelegate {
}
private MessageMetaData getMetaData(POP3Session session, int number)
throws IOException {
+ if (number <= 0) {
+ throw new IOException("MessageMetaData does not exist for number "
+ number);
+ }
return session.getAttachment(POP3Session.UID_LIST,
ProtocolSession.State.Transaction)
.filter(uidList -> number <= uidList.size())
.map(uidList -> uidList.get(number - 1))
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]