Fix for Incident #12351 Email Parser stuck on AGINFRA Gateway

git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portal/social-mail-servlet@171241 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Massimiliano Assante 2018-08-30 10:07:05 +00:00
parent 41dee760bd
commit 27bcfbc797
3 changed files with 7 additions and 2 deletions

View File

@ -1,4 +1,8 @@
<ReleaseNotes> <ReleaseNotes>
<Changeset component="org.gcube.portal.social-mail-servlet.2-3-0"
date="2018-08-30">
<Change>Fix for Incident #12351 Email Parser stuck on AGINFRA Gateway</Change>
</Changeset>
<Changeset component="org.gcube.portal.social-mail-servlet.2-1-1" <Changeset component="org.gcube.portal.social-mail-servlet.2-1-1"
date="2017-02-03"> date="2017-02-03">
<Change>Minor refactor for comment replies</Change> <Change>Minor refactor for comment replies</Change>

View File

@ -11,7 +11,7 @@
<groupId>org.gcube.portal</groupId> <groupId>org.gcube.portal</groupId>
<artifactId>social-mail-servlet</artifactId> <artifactId>social-mail-servlet</artifactId>
<packaging>war</packaging> <packaging>war</packaging>
<version>2.2.0-SNAPSHOT</version> <version>2.3.0-SNAPSHOT</version>
<name>social-mail-servlet Webapp</name> <name>social-mail-servlet Webapp</name>
<description>This component read periodically email replies from user wanting to reply to a post via email</description> <description>This component read periodically email replies from user wanting to reply to a post via email</description>

View File

@ -485,7 +485,8 @@ public class PeriodicTask implements Runnable {
for (int i = 0; i < emails.length; i++) { for (int i = 0; i < emails.length; i++) {
String toParse = emails[i].toString(); String toParse = emails[i].toString();
int plus = toParse.lastIndexOf('+'); int plus = toParse.lastIndexOf('+');
int at = toParse.indexOf('@'); int at = toParse.lastIndexOf('@');
_log.debug("EMAIL Address to Parse = " + toParse + " plus=" + plus + " at="+at);
if (plus >= 0) { if (plus >= 0) {
subAddressToReturn = toParse.substring(plus+1, at); subAddressToReturn = toParse.substring(plus+1, at);
break; break;