logo       

Patch for broken deprecatevar: msg#00087

apache.mod-security.user

Subject: Patch for broken deprecatevar

Hello,

the tranformation function deprecatevar does not work in release 2.0.3
and 2.0.4-dev3 as LAST_UPDATE_TIME is not read correctly.
Below is a patch which should fix it.

Regards,
Christoph


--- re_actions.c.orig 2006-11-10 13:50:04.000000000 +0100
+++ re_actions.c 2006-11-15 01:03:10.000000000 +0100
@@ -1060,14 +1060,14 @@
current_value = atoi(var->value);

/* Find the last update time (of the collection). */
- s = (char *)apr_table_get(target_col, "LAST_UPDATE_TIME");
- if (s == NULL) {
+ msc_string *lut = (msc_string *)apr_table_get(target_col,
"LAST_UPDATE_TIME");
+ if (lut == NULL) {
/* IMP1 Internal error - collections must have this parameter. */
return 0;
}

current_time = (unsigned int)apr_time_sec(apr_time_now());
- last_update_time = atoi(s);
+ last_update_time = atoi(lut->value);

s = strstr(var_value, "/");
if (s == NULL) {


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise