Hi I've just noticed on 1.7.1 that it only save 10 characters for this field.
I need to enter "%d/%m/%Y %X" (11 characters) to override the default US format on the server I'm using.
Interestingly, even though the server's locale is set to en_NZ and the timezone to Pacific/Auckland it still displays in US format!
[Resolved] Length of Date Format String on User Preferences Page
[Resolved] Length of Date Format String on User Preferences Page
Last edited by GBR on Thu Jun 17, 2010 2:46 am, edited 1 time in total.
Re: [Logged as Bug #5062] Length of Date Format String on User Preferences Page
I've just spotted the same bug. I guess it will be solved in the next official update. But meanwhile you can easily solve it yourself.
Edit editprefs.php in de admin-directory on line 95:
to
The value 20 can be changed to your personal flavor but I think 20 should do.
Edit editprefs.php in de admin-directory on line 95:
Code: Select all
$date_format_string = substr(strip_tags($date_format_string),0,10);
Code: Select all
$date_format_string = substr(strip_tags($date_format_string),0,20);
Re: [Logged as Bug #5062] Length of Date Format String on User Preferences Page
This is fixed in SVN and will be shipped with upcoming 1.8.
Ronny
Ronny
[Solved] Re: Length of Date Format String on User Preferences Page
Thanks bertmelisbertmelis wrote: I've just spotted the same bug. I guess it will be solved in the next official update. But meanwhile you can easily solve it yourself.
Edit editprefs.php in de admin-directory on line 95:toCode: Select all
$date_format_string = substr(strip_tags($date_format_string),0,10);
The value 20 can be changed to your personal flavor but I think 20 should do.Code: Select all
$date_format_string = substr(strip_tags($date_format_string),0,20);
I'd already made that change, but I thought we weren't supposed to post unofficial patches to the fora...

As noted later in the thread, it's been fixed in SVN. Thanks RonnyK
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
Re: [Resolved] Length of Date Format String on User Preferences Page
This is a perfect example of WHY you shouldn't post code changes to the forum.
In this exact case that length was in place to resolve a potential (though very low risk) XSS issue... although it was from 'trusted' users (I fixed it differently in CMS 1.
.
And the posted solution is a) wrong, and b) potentially (though VERY unlikely) makes your site vulnerable.
Again, if you make changes like these, DON"T SHARE THEM. Others don't have the expertise to deal with the problems created by applying 'patches' received by others (Hell allot of em don't have the knowledge to deal with the problems they create themselves), and we don't have the time or manpower to deal with all the reprocussions of patches like this gone wrong.
In this exact case that length was in place to resolve a potential (though very low risk) XSS issue... although it was from 'trusted' users (I fixed it differently in CMS 1.

And the posted solution is a) wrong, and b) potentially (though VERY unlikely) makes your site vulnerable.
Again, if you make changes like these, DON"T SHARE THEM. Others don't have the expertise to deal with the problems created by applying 'patches' received by others (Hell allot of em don't have the knowledge to deal with the problems they create themselves), and we don't have the time or manpower to deal with all the reprocussions of patches like this gone wrong.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.