You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by mt...@apache.org on 2009/12/21 13:39:30 UTC

svn commit: r892800 - in /tomcat/jk/trunk: native/common/jk_status.c xdocs/miscellaneous/changelog.xml

Author: mturk
Date: Mon Dec 21 12:39:29 2009
New Revision: 892800

URL: http://svn.apache.org/viewvc?rev=892800&view=rev
Log:
Fix #48305. Skip if property ends with .secret

Modified:
    tomcat/jk/trunk/native/common/jk_status.c
    tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml

Modified: tomcat/jk/trunk/native/common/jk_status.c
URL: http://svn.apache.org/viewvc/tomcat/jk/trunk/native/common/jk_status.c?rev=892800&r1=892799&r2=892800&view=diff
==============================================================================
--- tomcat/jk/trunk/native/common/jk_status.c (original)
+++ tomcat/jk/trunk/native/common/jk_status.c Mon Dec 21 12:39:29 2009
@@ -4403,7 +4403,13 @@
         for (i=0;i<l;i++) {
             const char *name = jk_map_name_at(init_data, i);
             if (name) {
-                const char *value = jk_map_value_at(init_data, i);
+                const char *value;
+                size_t nl = strlen(name);
+                if (nl > sizeof(".secret") &&
+                    strcmp(name + nl - 7, ".secret") == 0) {
+                    continue;
+                }
+                value = jk_map_value_at(init_data, i);
                 if (!value)
                     value = "(null)";
                 if (mime == JK_STATUS_MIME_HTML ||

Modified: tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml?rev=892800&r1=892799&r2=892800&view=diff
==============================================================================
--- tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml (original)
+++ tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml Mon Dec 21 12:39:29 2009
@@ -44,6 +44,10 @@
   <subsection name="Native">
     <changelog>
       <fix>
+        <bug>48305</bug>: Status: Do not show secret property when
+        doing dump. (mturk)
+      </fix>
+      <fix>
         <bug>47224</bug>: Status: When address gets changed invalidate
         all opened sockets in the endpoint cache. This will cause new
         backend connections to get opened using new address. (mturk)



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: svn commit: r892800 - in /tomcat/jk/trunk: native/common/jk_status.c xdocs/miscellaneous/changelog.xml

Posted by Mladen Turk <mt...@apache.org>.
On 12/23/2009 08:50 AM, Konstantin Kolinko wrote:
> 2009/12/21<mt...@apache.org>:
>> Author: mturk
>> Date: Mon Dec 21 12:39:29 2009
>> New Revision: 892800
>>
>> URL: http://svn.apache.org/viewvc?rev=892800&view=rev
>> Log:
>> Fix #48305. Skip if property ends with .secret
>>
>> Modified:
>>     tomcat/jk/trunk/native/common/jk_status.c
>>     tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml
>>
>> +                size_t nl = strlen(name);
>> +                if (nl>  sizeof(".secret")&&
>> +                    strcmp(name + nl - 7, ".secret") == 0) {
>> +                    continue;
>> +                }
>
> What is sizeof(".secret")?  I suppose it is sizeof(char*) that is 4 or
> 8, and you are using an explicit '7' on the next line.

Right, should be 'sizeof(".secret") - 1'.

and sizeof("foo") is 4 -> strlen("foo") + 1 FYI :)


-- 
^TM

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: svn commit: r892800 - in /tomcat/jk/trunk: native/common/jk_status.c xdocs/miscellaneous/changelog.xml

Posted by Konstantin Kolinko <kn...@gmail.com>.
2009/12/21  <mt...@apache.org>:
> Author: mturk
> Date: Mon Dec 21 12:39:29 2009
> New Revision: 892800
>
> URL: http://svn.apache.org/viewvc?rev=892800&view=rev
> Log:
> Fix #48305. Skip if property ends with .secret
>
> Modified:
>    tomcat/jk/trunk/native/common/jk_status.c
>    tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml
>
> +                size_t nl = strlen(name);
> +                if (nl > sizeof(".secret") &&
> +                    strcmp(name + nl - 7, ".secret") == 0) {
> +                    continue;
> +                }

What is sizeof(".secret")?  I suppose it is sizeof(char*) that is 4 or
8, and you are using an explicit '7' on the next line.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org