View Issue Details

IDProjectCategoryView StatusLast Update
0014097mantisbtotherpublic2014-09-23 18:05
Reporterschoppi71 Assigned Todregad  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformLinux SuSE Linux Enterprise ServOSSuSe Linux Enterprise ServerOS Version10 SP2 64-Bit
Product Version1.2.9 
Target Version1.2.10Fixed in Version1.2.10 
Summary0014097: German 'Umlaute' with closing question mark failed
Description

If I insert in the description field two german Umlaute like üäöß? with a closing question mark mantis will fail without error message. Only a white page is shown.
The same effect will occur if I insert such a string in a note field.

e.g. üä?

TagsNo tags attached.

Relationships

related to 0013280 closeddregad Sort by accented custom field produces incorrect log entries 
related to 0015721 closedgrangeway Functionality to consider porting to master-2.0.x 

Activities

schoppi71

schoppi71

2012-03-26 08:52

reporter   ~0031534

I'm using Mantis 1.2.9 with PostgreSQL-DB 8.3.7 on Linux SuSE Linux Enterprise Server 10 SP2 64-Bit.

schoppi71

schoppi71

2012-03-26 08:58

reporter   ~0031535

This won't fail:
ö?
?öö
öö
öö?ö

there must be at least 2 german Umlaute plus a closing ?

dregad

dregad

2012-03-27 08:16

developer   ~0031542

Can you please confirm the value of $g_show_queries_list in your config ?

schoppi71

schoppi71

2012-03-27 08:35

reporter   ~0031543

$g_show_queries_list = ON;

dregad

dregad

2012-03-27 09:29

developer   ~0031546

In that case, I think the behavior you're seeing is due to the same root cause as 0013280, i.e. preg_match using a byte-based offset while the parsed string is UTF-8 (potentially multi-byte).

I'll fix that later. In the meanwhile, if you set $g_show_queries_list = OFF (which by the way is in any case the recommended value), you should not experience this problem anymore.

schoppi71

schoppi71

2012-03-27 09:45

reporter   ~0031547

You are right! After switching $g_show_queries_list to OFF the problem is vanished.
Thanks

dregad

dregad

2012-03-27 11:33

developer   ~0031551

Could you test this code ? (remember to put $g_show_queries_list back to ON)

https://github.com/dregad/mantisbt/tree/fix-14097

schoppi71

schoppi71

2012-03-28 10:27

reporter   ~0031556

Hey dregard,
which file or files you have changed? I'm not familar with Git ...

dregad

dregad

2012-03-29 07:01

developer   ~0031557

Only core/database_api.php

schoppi71

schoppi71

2012-03-29 08:20

reporter   ~0031559

I tested the new version of database_api.php and it works now.

dregad

dregad

2012-03-29 15:50

developer   ~0031562

Thanks for testing ! I'll commit the changes later.

grangeway

grangeway

2013-04-05 17:57

reporter   ~0036290

Marking as 'acknowledged' not resolved/closed to track that change gets ported to master-2.0.x branch

Related Changesets

MantisBT: master 50f45ad5

2012-03-27 01:16

dregad


Details Diff
Fix utf8 offset when logging SQL in db_query_bound

The fix for 0013280 (5835572fde9df4d0837f0105c6c44c75fe64c07c) only fixed
one part of the problem, i.e. when the UTF8 characters were in the SQL
query itself. This commit fixes the remaining case when the string
parameters contain multibyte chars.

Fixes 0014097
Affected Issues
0014097
mod - core/database_api.php Diff File

MantisBT: master-1.2.x 094d4b27

2012-03-27 01:16

dregad


Details Diff
Fix utf8 offset when logging SQL in db_query_bound

The fix for 0013280 (5835572fde9df4d0837f0105c6c44c75fe64c07c) only fixed
one part of the problem, i.e. when the UTF8 characters were in the SQL
query itself. This commit fixes the remaining case when the string
parameters contain multibyte chars.

Fixes 0014097
Affected Issues
0014097
mod - core/database_api.php Diff File