Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes sieve parsing bug when comments contain empty lines #5657

Closed
wants to merge 1 commit into from

Conversation

hansmaulwurf23
Copy link
Contributor

Sample sieve filter set to reproduce the error:

require ["fileinto","envelope","regex","body","relational","subaddress","variables","imap4flags","date","include"];

# simple comment

# another comment
if envelope :detail "to" "addressextension" {
    setflag "\\Flagged";
}

# Spam
if header :is "X-Spam-Flag" "YES" {
 	fileinto "Junk";
  	stop;
}

Wihtout removing the empty line between # simple comment and # another comment the parser produces rubbish.

@alecpl
Copy link
Member

alecpl commented Feb 20, 2017

Thanks for the patch. I fixed this in a cleaner way.

@alecpl alecpl closed this Feb 20, 2017
@alecpl alecpl added this to the 1.2.4 milestone Feb 20, 2017
ZiBiS added a commit to ZiBiS/roundcubemail that referenced this pull request Mar 7, 2017
* 'master' of https://github.com/roundcube/roundcubemail: (46 commits)
  Plugin API: Call message_part_structure hook for sub-parts of multipart/alternative message (roundcube#5678)
  Enigma: Set micalg parameter to real hash algorithm used for signing
  Skip iconv for problematic ISO-2022-JP strings  (roundcube#5668)
  Lock phpunit to version 5.7.x
  Fix/rephrase "unsaved changes" warning when cancelling a draft (roundcube#5610)
  Use stable release of Crypt_GPG 1.6
  small fix for current group detection and add similar rules for group-delete
  Managesieve: Fix parser issue with empty lines between comments (roundcube#5657)
  Minimize unwanted message loading in preview frame on drag (roundcube#5616)
  Small code simplification
  Fix bug where it was too easy accidentally move a folder when using the subscription checkbox (roundcube#5655)
  also fix source in group create function
  check group id matches current one before changing the title
  Add rewrite rule to disable access to /vendor/bin folder in .htaccess (roundcube#5630)
  Fix update of group name in the contacts list header on group rename (roundcube#5648)
  don't use env for group-rename action
  Add note about PinEntry issues with SELinux (roundcube#5620)
  Enigma: Fix handling of messages with nested PGP encrypted parts (roundcube#5634)
  Bring back lists buttons in TinyMCE toolbar
  Fix double http request regression (roundcube#5633)
  ...
alecpl added a commit that referenced this pull request May 19, 2017
ZiBiS added a commit to ZiBiS/roundcubemail that referenced this pull request May 23, 2017
* 'master' of https://github.com/roundcube/roundcubemail: (53 commits)
  Bump version number
  Performance: Skip redundant LISTSCRIPTS command
  CS fixes
  Use pear/net_sieve instead of our fork as it's up-to-date and maintained by us now
  Enigma: Fix compatibility with assets_dir
  Update changelog, CS fixes
  strncasecmp() -> strcasecmp()
  Remove redundant border in About dialog
  Add test for roundcube#5657
  Support AUTHENTICATE LOGIN for IMAP connections (roundcube#5563)
  Highlight listmenu button when focused + better button style
  Fix var name
  Remove redundant code
  Support LDAP GSSAPI authentication (roundcube#5703)
  Add timezones.inc to transifex config
  Display loading message when going to another page (roundcube#5541)
  Add some accents and make some timezone names userfriendly
  Fix typo: s/UTC+/UTC/
  Allow contacts without an email address (roundcube#5079)
  Update changelog
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants