Scalable OGo (SOGo)

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004290SOGoBackend Mailpublic2017-09-18 06:242017-10-11 11:20
Reporterrongten 
Assigned Tofrancis 
PriorityurgentSeverityblockReproducibilityalways
StatusresolvedResolutionfixed 
Platform[Server] LinuxOSRHEL/CentOSOS Version7
Product Versionnightly v3 
Target VersionFixed in Version 
Summary0004290: When Imap Folder contains a number, it is filtered out and there is an error in the webmail starting from sogo-3.2.10.20170915
DescriptionHello,

 very strange thing, when I updated from sogo.x86_64 3.2.9.20170604-1.el7.centos to sogo-3.2.10.20170915-1.el7.centos.x86_64 I started having trouble with folders that contain numbers in them.

 Previously all was ok, now you cannot access a folder with a number and the sogo.log gives the following error when you try to access a folder called test1:

Sep 18 12:20:55 sogod [4066]: [ERROR] <0x0x7f069a3bb6b0[NGImap4Connection]> could not select URL: imap://USER@localhost/test/: {RawResponse = "{ResponseResult = {description = \"Mailbox doesn't exist: test\"; result = no; tagId = 6; }; }"; reason = "Mailbox doesn't exist: test"; result = 0; }

You can create a new folder from the webinterface, it is listed in the folders pane, but you cannot access it anymore.

The content is of course accessible via an Imap Client, like it was before accessible from the webmail.

Steps To ReproduceTry to open a Mail folder with a number in the name.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to 0004287resolvedfrancis [NGImap4Connection] Can't no more access to folder after renaming it 

-  Notes
(0012302)
cedric.archambeau (reporter)
2017-09-18 08:53

I think this bug is in the neighborhood of 0004287.
Thanks for report, I'm feeling less alone.
(0012304)
rongten (reporter)
2017-09-18 09:10

Hello Cedric,

 I saw your bug, but I was not sure was the same issue, so I opened a new one.

 To make sure is the same bug, we could try to have the same debug options and try the same steps to reproduce (I am on centos 7 with the nightly rpms).

 I have in my /etc/sogo/sogo.conf the following debug enabled:

  SOGoDebugRequests = YES;
  SoDebugBaseURL = YES;
  LDAPDebugEnabled = YES;
  PGDebugEnabled = YES;
  MySQL4DebugEnabled = YES;
  WODontZipResponse = YES;

I open a terminal and I do a tail -f /var/log/sogo/sogo.log


On the web gui I create a new folder (i.e. test2017) and on the log I see a successful folder creation:

Sep 18 15:04:55 sogod [4874]: |SOGo| request took 0.765789 seconds to execute
Sep 18 15:04:55 sogod [4874]: 10.1.2.70 "POST /SOGo/so/USER/Mail/0/createFolder HTTP/1.1" 204 0/19 0.770 - - 0
Sep 18 15:04:55 sogod [4874]: |SOGo| starting method 'GET' on uri '/SOGo/so/USER/Mail/0/view'
Sep 18 15:04:55 sogod [4874]: |SOGo| request took 0.366927 seconds to execute
Sep 18 15:04:55 sogod [4874]: 10.1.2.70 "GET /SOGo/so/USER/Mail/0/view HTTP/1.1" 200 3249/0 0.368 - - 0

then when I try to get into the very same folder I just created, I get the error message "An error occurred.." on the web client and on the log I get

Sep 18 15:06:42 sogod [4874]: [ERROR] <0x0x7f069aacab80[NGImap4Connection]> could not select URL: imap://USER@localhost/test/: {RawResponse = "{ResponseResult = {description = \"Mailbox doesn't exist: test\"; result = no; tagId = 6; }; }"; reason = "Mailbox doesn't exist: test"; result = 0; }

If you rename to test2017test from thunderbird, the error message on the log becomes:
Sep 18 15:08:50 sogod [4874]: |SOGo| starting method 'POST' on uri '/SOGo/so/USER/Mail/0/foldertesttest/view'
Sep 18 15:08:50 sogod [4874]: [ERROR] <0x0x7f069ab4f730[NGImap4Connection]> could not select URL: imap://USER@localhost/testtest/: {RawResponse = "{ResponseResult = {description = \"Mailbox doesn't exist: testtest\"; result = no; tagId = 6; }; }"; reason = "Mailbox doesn't exist: testtest"; result = 0; }
Sep 18 15:08:50 sogod [4874]: 10.1.2.70 "POST /SOGo/so/USER/Mail/0/foldertesttest/view HTTP/1.1" 500 72/45 0.374 - - 0


The numbers are strangely removed from the folder name.
(0012305)
rongten (reporter)
2017-09-18 09:18

Scratch that, this is exactly 0004287, very little doubt about it.
User avatar (0012307)
francis (administrator)
2017-09-18 12:23

Fixed.

See https://github.com/inverse-inc/sogo/commit/d02f0db0b48f0631ecbaaa6d5f015e5407b035a9 [^]
(0012311)
rongten (reporter)
2017-09-19 08:24

Hello,

 I have installed sogo-3.2.10.20170919-1.el7.centos.x86_64 that as far as I understand contains the commit proposed by Francis.

However the issue is still there.

Using the developer tools of chrome I see something very strange in the String.prototype.asCSSIdentifier.

I see that when I do an hard refresh and sogo rebuilds the folder list (I think), when it arrives to "test1" it does something very strange:

It does the loop at line 147, it does not find any special character to change (i.e. _ to _U_), and when it arrives at line 152, the newString value is updated to "test" from test1.

If I remove lines 152 and 154-156, when it arrives to the return statement, the newString value changes alone to "test".

It is very strange, I empty the cache each time (developer mode + "Empty Cache and Hard Reload") and I tried many times and still the digits are removed from the newString variable.

If I remove the handling of exceptions an the function becomes only
String.prototype.asCSSIdentifier = function() {
  var characters = [ '_' , '\\.', '#' , '@' , '\\*', ':' , ',' , ' ', "'", '&', '\\+' ];
  var escapeds = [ '_U_', '_D_', '_H_', '_A_', '_S_', '_C_', '_CO_', '_SP_', '_SQ_', '_AM_', '_P_' ];

  var newString = this;

  return newString;
};

I still have the error with the imap request for folder test instead of test1.

I am not really into javascript debugging, I do not know how to look further...

Am I doing something wrong?
User avatar (0012312)
francis (administrator)
2017-09-19 08:33

Looks like our bot failed to generated the static JavaScript files last night, so you're still running the broken version.
(0012313)
rongten (reporter)
2017-09-19 09:00

Ah, ok. This is over my head, sorry.

Is there a way for me to compile these files myself or it is better to wait for next nightly?
User avatar (0012314)
francis (administrator)
2017-09-19 09:10

Wait for the next build.
(0012318)
cedric.archambeau (reporter)
2017-09-20 04:55

3.2.10.20170920-1 : first tests OK for me.

Thanks Francis
(0012319)
rongten (reporter)
2017-09-20 07:08

Same here!

- Issue History
Date Modified Username Field Change
2017-09-18 06:24 rongten New Issue
2017-09-18 08:53 cedric.archambeau Note Added: 0012302
2017-09-18 09:10 rongten Note Added: 0012304
2017-09-18 09:18 rongten Note Added: 0012305
2017-09-18 12:23 francis Note Added: 0012307
2017-09-18 12:23 francis Status new => resolved
2017-09-18 12:23 francis Resolution open => fixed
2017-09-18 12:23 francis Assigned To => francis
2017-09-18 12:23 francis Product Version 3.2.10 => nightly v3
2017-09-18 12:24 francis Relationship added related to 0004287
2017-09-19 08:24 rongten Note Added: 0012311
2017-09-19 08:24 rongten Status resolved => feedback
2017-09-19 08:24 rongten Resolution fixed => reopened
2017-09-19 08:33 francis Note Added: 0012312
2017-09-19 09:00 rongten Note Added: 0012313
2017-09-19 09:00 rongten Status feedback => assigned
2017-09-19 09:10 francis Note Added: 0012314
2017-09-20 04:55 cedric.archambeau Note Added: 0012318
2017-09-20 07:08 rongten Note Added: 0012319
2017-10-11 11:20 ludovic Status assigned => resolved
2017-10-11 11:20 ludovic Resolution reopened => fixed


Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker