https://bz.apache.org/bugzilla/show_bug.cgi?id=58286
Bug ID: 58286 Summary: Crash in jk-status on Windows (when producing HTML output) Product: Tomcat Connectors Version: 1.2.41 Hardware: All Status: NEW Severity: normal Priority: P2 Component: Common Assignee: dev@tomcat.apache.org Reporter: rainer.j...@kippdata.de The fix for BZ 54177 introduced a new problem on the Windows platform. The use of strftime() with the format pattern %z works well on Unix/Linux, but %z on Windows has a totally different meaning. It doesn't return a numeric timezone info, but instead the full time zone name. This results in the same non-well formed XML problem as in BZ 54177, but furthermore when formatting the time stamp in jk-status for HTML output it results in a crash. This should happen for mod_jk and for the ISAPI redirector. Apart from Windows there might also be a problem on Netware (untested). The problem should not happen, when calling jk-status with the query string ?mime=txt, ?mime=prop or ?mime=xml. Only the default (equivalent to ?mime=html) is affected. Since the time zone info is not critical, the simplest short term mitigation is removing "%z" from the strftime format string before building: Index: native/common/jk_status.c =================================================================== --- native/common/jk_status.c (revision 1697988) +++ native/common/jk_status.c (working copy) @@ -241,9 +241,9 @@ #define JK_STATUS_WAIT_AFTER_UPDATE "3" #define JK_STATUS_REFRESH_DEF "10" #define JK_STATUS_ESC_CHARS ("<>?\"") -#define JK_STATUS_TIME_FMT_HTML "%Y-%m-%d %H:%M:%S %z" +#define JK_STATUS_TIME_FMT_HTML "%Y-%m-%d %H:%M:%S" #define JK_STATUS_TIME_FMT_TEXT "%Y%m%d%H%M%S" -#define JK_STATUS_TIME_FMT_TZ "%z" +#define JK_STATUS_TIME_FMT_TZ "" #define JK_STATUS_TIME_BUF_SZ (30) #define JK_STATUS_HEAD "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n" \ Any broken binary should be "fixable" as a workaound by editing and overwriting the two occurences of %z in the binary file with spaces. Do not remove the %z, just replace by two spaces in both places where it occurs. make sure to not change any other bytes in the binary. The fix for the next version will be to use specific timezone formatting for Windows. Probably it will be based on _get_timezone(). Netware will need to be checked. -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org