You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2020/02/24 20:14:05 UTC

svn commit: r1874468 - in /tomcat/site/trunk: docs/security-8.html xdocs/security-8.xml

Author: markt
Date: Mon Feb 24 20:14:04 2020
New Revision: 1874468

URL: http://svn.apache.org/viewvc?rev=1874468&view=rev
Log:
Fix broken link. Need 8 chars to be unique for this one.

Modified:
    tomcat/site/trunk/docs/security-8.html
    tomcat/site/trunk/xdocs/security-8.xml

Modified: tomcat/site/trunk/docs/security-8.html
URL: http://svn.apache.org/viewvc/tomcat/site/trunk/docs/security-8.html?rev=1874468&r1=1874467&r2=1874468&view=diff
==============================================================================
--- tomcat/site/trunk/docs/security-8.html (original)
+++ tomcat/site/trunk/docs/security-8.html Mon Feb 24 20:14:04 2020
@@ -89,7 +89,7 @@
     <p>This was fixed with commits
        <a href="https://github.com/apache/tomcat/commit/69c5608">69c5608</a>,
        <a href="https://github.com/apache/tomcat/commit/b962835">b962835</a>,
-       <a href="https://github.com/apache/tomcat/commit/5a5494f">5a5494f</a>,
+       <a href="https://github.com/apache/tomcat/commit/5a5494f0">5a5494f0</a>,
        <a href="https://github.com/apache/tomcat/commit/9be5760">9be5760</a>,
        <a href="https://github.com/apache/tomcat/commit/64159aa">64159aa</a> and
        <a href="https://github.com/apache/tomcat/commit/03c4361">03c4361</a>.</p>

Modified: tomcat/site/trunk/xdocs/security-8.xml
URL: http://svn.apache.org/viewvc/tomcat/site/trunk/xdocs/security-8.xml?rev=1874468&r1=1874467&r2=1874468&view=diff
==============================================================================
--- tomcat/site/trunk/xdocs/security-8.xml (original)
+++ tomcat/site/trunk/xdocs/security-8.xml Mon Feb 24 20:14:04 2020
@@ -101,7 +101,7 @@
     <p>This was fixed with commits
        <hashlink hash="69c5608">69c5608</hashlink>,
        <hashlink hash="b962835">b962835</hashlink>,
-       <hashlink hash="5a5494f">5a5494f</hashlink>,
+       <hashlink hash="5a5494f0">5a5494f0</hashlink>,
        <hashlink hash="9be5760">9be5760</hashlink>,
        <hashlink hash="64159aa">64159aa</hashlink> and
        <hashlink hash="03c4361">03c4361</hashlink>.</p>



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


Re: svn commit: r1874468 - in /tomcat/site/trunk: docs/security-8.html xdocs/security-8.xml

Posted by Felix Schumacher <fe...@internetallee.de>.

Am 25. Februar 2020 19:22:39 MEZ schrieb Konstantin Kolinko <kn...@gmail.com>:
>вт, 25 февр. 2020 г. в 18:26, Felix Schumacher
><fe...@internetallee.de>:
>>
>>
>> Am 25.02.20 um 10:22 schrieb Felix Schumacher:
>>
>> Index: xdocs/stylesheets/tomcat-site.xsl
>> ===================================================================
>> --- xdocs/stylesheets/tomcat-site.xsl    (Revision 1874497)
>> +++ xdocs/stylesheets/tomcat-site.xsl    (Arbeitskopie)
>> @@ -359,7 +359,7 @@
>>    <!-- Link to a git hash -->
>>    <xsl:template match="hashlink">
>>        <xsl:variable name="link"><xsl:value-of
>> select="$hashlink"/><xsl:value-of select="@hash"/></xsl:variable>
>> -      <a href="{$link}"><xsl:apply-templates/></a>
>> +      <a href="{$link}"><xsl:value-of select="substring(@hash, 0,
>9)"/></a>
>>    </xsl:template>
>>
>>    <!-- Link to a CVE report -->
>>
>> would take care of using the substring for the text.
>
>The XPath documentation for substring function [1] says that character
>positions in that function start with 1 (but any value less than 1 is
>treated as 1, so 0 works as well).

Good to know. Hadn't checked the docs on this, as it did what I wanted. 

Will correct it, if course. 

Regards 
 Felix 
>
>[1] https://www.w3.org/TR/1999/REC-xpath-19991116/#function-substring
>
>Best regards,
>Konstantin Kolinko
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
>For additional commands, e-mail: dev-help@tomcat.apache.org

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


Re: svn commit: r1874468 - in /tomcat/site/trunk: docs/security-8.html xdocs/security-8.xml

Posted by Konstantin Kolinko <kn...@gmail.com>.
вт, 25 февр. 2020 г. в 18:26, Felix Schumacher
<fe...@internetallee.de>:
>
>
> Am 25.02.20 um 10:22 schrieb Felix Schumacher:
>
> Index: xdocs/stylesheets/tomcat-site.xsl
> ===================================================================
> --- xdocs/stylesheets/tomcat-site.xsl    (Revision 1874497)
> +++ xdocs/stylesheets/tomcat-site.xsl    (Arbeitskopie)
> @@ -359,7 +359,7 @@
>    <!-- Link to a git hash -->
>    <xsl:template match="hashlink">
>        <xsl:variable name="link"><xsl:value-of
> select="$hashlink"/><xsl:value-of select="@hash"/></xsl:variable>
> -      <a href="{$link}"><xsl:apply-templates/></a>
> +      <a href="{$link}"><xsl:value-of select="substring(@hash, 0, 9)"/></a>
>    </xsl:template>
>
>    <!-- Link to a CVE report -->
>
> would take care of using the substring for the text.

The XPath documentation for substring function [1] says that character
positions in that function start with 1 (but any value less than 1 is
treated as 1, so 0 works as well).

[1] https://www.w3.org/TR/1999/REC-xpath-19991116/#function-substring

Best regards,
Konstantin Kolinko

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


Re: svn commit: r1874468 - in /tomcat/site/trunk: docs/security-8.html xdocs/security-8.xml

Posted by Felix Schumacher <fe...@internetallee.de>.
Am 25.02.20 um 10:22 schrieb Felix Schumacher:
> Am 24.02.2020 22:13, schrieb Christopher Schultz:
> Mark,
>
> On 2/24/20 15:46, Mark Thomas wrote:
> >>> On 24/02/2020 20:31, Christopher Schultz wrote:
> >>>> Mark,
> >>>
> >>>> Why not use the full commit id instead of a prefix? Couldn't
> >>>> some future commit conflict with some arbitrary prefix? Or do I
> >>>> not know what the hell I'm talking about?
> >>>
> >>> No, you are spot on. The reason I used the prefix is that I was
> >>> transcribing the commit IDs by hand so the prefixes were easier.
> >>> We probably should use the full ID or at least a longer prefix.
>
> I wonder if we could script this: grab a prefix, find the (one and
> only one) commit in the repo and expand it. If there is a conflict (or
> more than one match), emit an error and continue without changing the
> commit id.
>
> When I do this kind of thing for $work, I like to write scripts that
> emit sed scripts. So you process e.g. security-8.html as input, but
> emit something like this as output:
>
> s/(\b)69c5608(\b)/\169c56080fb3355507e1b55d014ec0ee6767a6150\2/g
> ...
>
> You get a script that can be inspected, re-used and, even better, it
> doesn't directly modify the input files. So you can even do something
> like this:
>
> $ expand-git-commit-ids.pl security-*.xml > expand.sed
>
> $ sed -i .bak -f expand.sed security-*.xml
>
> And then if you find other files where the same kind of thing needs to
> be done, you can re-use the expand.sed script, or even (pun intended)
> expand the sed script if necessary.
>
> > I would use the full hash in the xml and use a substring-function in
> the xsl to shorten the hash for readability.
>
> > No need for sed here :)

Now - that I re-read Chris answer - I see what he had in mind.

I think we can combine the two things. First use a script to convert the
hashes to the full version and second, adapt the xslt to emit a shorter
version for the text of the link.

perl -M5.020 -ne 'say $1 if /hashlink hash="(\w+)"/'
../tomcat-site-trunk/xdocs/security-9.xml | while read i; do git log 
--pretty="s/\\b$i\\b/%H/g" -l 1 $i^1..$i | cat; done

That would generate the sed script for security-9.xml

And

Index: xdocs/stylesheets/tomcat-site.xsl
===================================================================
--- xdocs/stylesheets/tomcat-site.xsl    (Revision 1874497)
+++ xdocs/stylesheets/tomcat-site.xsl    (Arbeitskopie)
@@ -359,7 +359,7 @@
   <!-- Link to a git hash -->
   <xsl:template match="hashlink">
       <xsl:variable name="link"><xsl:value-of
select="$hashlink"/><xsl:value-of select="@hash"/></xsl:variable>
-      <a href="{$link}"><xsl:apply-templates/></a>
+      <a href="{$link}"><xsl:value-of select="substring(@hash, 0, 9)"/></a>
   </xsl:template>
 
   <!-- Link to a CVE report -->

would take care of using the substring for the text.

We would loose the ability to use arbitrary text in the link, but it
wasn't used anyway.

Felix

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


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


Re: svn commit: r1874468 - in /tomcat/site/trunk: docs/security-8.html xdocs/security-8.xml

Posted by Felix Schumacher <fe...@internetallee.de>.
Am 25.02.20 um 16:27 schrieb Felix Schumacher:
> Am 25.02.20 um 16:24 schrieb Christopher Schultz:
>> Felix,
>>
>> On 2/25/20 04:22, Felix Schumacher wrote:
>>> Am 24.02.2020 22:13, schrieb Christopher Schultz: Mark,
>>> On 2/24/20 15:46, Mark Thomas wrote:
>>>>>> On 24/02/2020 20:31, Christopher Schultz wrote:
>>>>>>> Mark,
>>>>>>> Why not use the full commit id instead of a prefix?
>>>>>>> Couldn't some future commit conflict with some arbitrary
>>>>>>> prefix? Or do I not know what the hell I'm talking about?
>>>>>> No, you are spot on. The reason I used the prefix is that I
>>>>>> was transcribing the commit IDs by hand so the prefixes were
>>>>>> easier. We probably should use the full ID or at least a
>>>>>> longer prefix.
>>> I wonder if we could script this: grab a prefix, find the (one and
>>> only one) commit in the repo and expand it. If there is a conflict
>>> (or more than one match), emit an error and continue without
>>> changing the commit id.
>>> When I do this kind of thing for $work, I like to write scripts
>>> that emit sed scripts. So you process e.g. security-8.html as
>>> input, but emit something like this as output:
>>> s/(\b)69c5608(\b)/\169c56080fb3355507e1b55d014ec0ee6767a6150\2/g
>>> ...
>>> You get a script that can be inspected, re-used and, even better,
>>> it doesn't directly modify the input files. So you can even do
>>> something like this:
>>> $ expand-git-commit-ids.pl security-*.xml > expand.sed
>>> $ sed -i .bak -f expand.sed security-*.xml
>>> And then if you find other files where the same kind of thing needs
>>> to be done, you can re-use the expand.sed script, or even (pun
>>> intended) expand the sed script if necessary.
>>>> I would use the full hash in the xml and use a substring-function
>>>> in the xsl to shorten the hash for readability.
>>>> No need for sed here :)
>> This was to initially fetch the full hashes. In the XML, now, they are
>> already shortened.
> See my other mail :)

Changed with r1874502.

Felix

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

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


Re: svn commit: r1874468 - in /tomcat/site/trunk: docs/security-8.html xdocs/security-8.xml

Posted by Felix Schumacher <fe...@internetallee.de>.
Am 25.02.20 um 16:24 schrieb Christopher Schultz:
> Felix,
>
> On 2/25/20 04:22, Felix Schumacher wrote:
> > Am 24.02.2020 22:13, schrieb Christopher Schultz: Mark,
>
> > On 2/24/20 15:46, Mark Thomas wrote:
> >>>> On 24/02/2020 20:31, Christopher Schultz wrote:
> >>>>> Mark,
> >>>>
> >>>>> Why not use the full commit id instead of a prefix?
> >>>>> Couldn't some future commit conflict with some arbitrary
> >>>>> prefix? Or do I not know what the hell I'm talking about?
> >>>>
> >>>> No, you are spot on. The reason I used the prefix is that I
> >>>> was transcribing the commit IDs by hand so the prefixes were
> >>>> easier. We probably should use the full ID or at least a
> >>>> longer prefix.
>
> > I wonder if we could script this: grab a prefix, find the (one and
> > only one) commit in the repo and expand it. If there is a conflict
> > (or more than one match), emit an error and continue without
> > changing the commit id.
>
> > When I do this kind of thing for $work, I like to write scripts
> > that emit sed scripts. So you process e.g. security-8.html as
> > input, but emit something like this as output:
>
> > s/(\b)69c5608(\b)/\169c56080fb3355507e1b55d014ec0ee6767a6150\2/g
> > ...
>
> > You get a script that can be inspected, re-used and, even better,
> > it doesn't directly modify the input files. So you can even do
> > something like this:
>
> > $ expand-git-commit-ids.pl security-*.xml > expand.sed
>
> > $ sed -i .bak -f expand.sed security-*.xml
>
> > And then if you find other files where the same kind of thing needs
> > to be done, you can re-use the expand.sed script, or even (pun
> > intended) expand the sed script if necessary.
>
> >> I would use the full hash in the xml and use a substring-function
> >> in the xsl to shorten the hash for readability.
>
> >> No need for sed here :)
>
> This was to initially fetch the full hashes. In the XML, now, they are
> already shortened.
See my other mail :)
>
> -chris
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>


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


Re: svn commit: r1874468 - in /tomcat/site/trunk: docs/security-8.html xdocs/security-8.xml

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Felix,

On 2/25/20 04:22, Felix Schumacher wrote:
> Am 24.02.2020 22:13, schrieb Christopher Schultz: Mark,
>
> On 2/24/20 15:46, Mark Thomas wrote:
>>>> On 24/02/2020 20:31, Christopher Schultz wrote:
>>>>> Mark,
>>>>
>>>>> Why not use the full commit id instead of a prefix?
>>>>> Couldn't some future commit conflict with some arbitrary
>>>>> prefix? Or do I not know what the hell I'm talking about?
>>>>
>>>> No, you are spot on. The reason I used the prefix is that I
>>>> was transcribing the commit IDs by hand so the prefixes were
>>>> easier. We probably should use the full ID or at least a
>>>> longer prefix.
>
> I wonder if we could script this: grab a prefix, find the (one and
> only one) commit in the repo and expand it. If there is a conflict
> (or more than one match), emit an error and continue without
> changing the commit id.
>
> When I do this kind of thing for $work, I like to write scripts
> that emit sed scripts. So you process e.g. security-8.html as
> input, but emit something like this as output:
>
> s/(\b)69c5608(\b)/\169c56080fb3355507e1b55d014ec0ee6767a6150\2/g
> ...
>
> You get a script that can be inspected, re-used and, even better,
> it doesn't directly modify the input files. So you can even do
> something like this:
>
> $ expand-git-commit-ids.pl security-*.xml > expand.sed
>
> $ sed -i .bak -f expand.sed security-*.xml
>
> And then if you find other files where the same kind of thing needs
> to be done, you can re-use the expand.sed script, or even (pun
> intended) expand the sed script if necessary.
>
>> I would use the full hash in the xml and use a substring-function
>> in the xsl to shorten the hash for readability.
>
>> No need for sed here :)

This was to initially fetch the full hashes. In the XML, now, they are
already shortened.

- -chris
-----BEGIN PGP SIGNATURE-----
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl5VPDUACgkQHPApP6U8
pFiOxQ/+K+R+H49bxxvq9Ly9fmyOJN/Q8VHG5Tx8Wj9zT890j1Dc8g+BvCIFxVCw
8ZUrl7P5kcQJh8M4UJ0InwmdFTPvZoQi8+Dks2WFztWTmiJH5yNxYFWFroV/hNRe
PPns6wlgLg7juNB2C3HuVThlLGOL3wK3esxb1m7ufklTHAfWr1wywxOZhyfVnzWU
e/On217dnVn4rnVCXGrAVix6noCyLz98ZaHVX3PQgNToN50hQDVxqA/pMgb3hX//
izZg6Na3P8XNXtz1JWaU+I5cLnOH4D+ce9YXxeBiCZKH9D6EbMa99pdfFHm+Pn54
Sip0p5shv3VPETzOtR1e4ZrdG7QM5Yrdl6yjryhBq4fz4ktsE10fQG7NzGrPgElk
Rz0cRbMZBhJmCs81FSvwpOlExiRlDsB5AR+ZnPJ0H3ptuBIkjOnF/JieTJseTc0l
ybSyMa6J40xbco5YdLNYhgXozE8mxXpiLdvJPG4P4gnUUyQ2n2cUSmKfcUY1tJk6
XHs/iQWoRQEDaM/lSjTrHz70DOEKyw2hzWmrJhz2C7nA3Oo7+KXCTWMjq5rbj/jh
HWt92/irSKTy4SQy8XvFNesOcRSkRxlvriWTy0iAgebpvYnaLecYnVAFcGy8RhYI
Amq5+2X+D50+TL+0IyaWHdm3803jORI/K4/tQDvKK1i5X6eWxt8=
=MAUE
-----END PGP SIGNATURE-----

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


Re: svn commit: r1874468 - in /tomcat/site/trunk: docs/security-8.html xdocs/security-8.xml

Posted by Felix Schumacher <fe...@internetallee.de>.
Am 24.02.2020 22:13, schrieb Christopher Schultz:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
> 
> Mark,
> 
> On 2/24/20 15:46, Mark Thomas wrote:
>> On 24/02/2020 20:31, Christopher Schultz wrote:
>>> Mark,
>> 
>>> Why not use the full commit id instead of a prefix? Couldn't
>>> some future commit conflict with some arbitrary prefix? Or do I
>>> not know what the hell I'm talking about?
>> 
>> No, you are spot on. The reason I used the prefix is that I was
>> transcribing the commit IDs by hand so the prefixes were easier.
>> We probably should use the full ID or at least a longer prefix.
> 
> I wonder if we could script this: grab a prefix, find the (one and
> only one) commit in the repo and expand it. If there is a conflict (or
> more than one match), emit an error and continue without changing the
> commit id.
> 
> When I do this kind of thing for $work, I like to write scripts that
> emit sed scripts. So you process e.g. security-8.html as input, but
> emit something like this as output:
> 
> s/(\b)69c5608(\b)/\169c56080fb3355507e1b55d014ec0ee6767a6150\2/g
> ...
> 
> You get a script that can be inspected, re-used and, even better, it
> doesn't directly modify the input files. So you can even do something
> like this:
> 
> $ expand-git-commit-ids.pl security-*.xml > expand.sed
> 
> $ sed -i .bak -f expand.sed security-*.xml
> 
> And then if you find other files where the same kind of thing needs to
> be done, you can re-use the expand.sed script, or even (pun intended)
> expand the sed script if necessary.

I would use the full hash in the xml and use a substring-function in the 
xsl to shorten the hash for readability.

No need for sed here :)

Felix

> 
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/
> 
> iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl5UPJMACgkQHPApP6U8
> pFieGBAAmLLPqCvkLguhEr0aXmDfNmjYsiO6FssEHV2zjmqjM1zzDfgjI+WDwogs
> ctGkcCvITq1BYCVlGxMrkMyYkTI9a8i6lILMpAOIUwNvTVKDF3AGKaMB+EMNqyY9
> 8qiCrWaDbVLqpsSuGn5OhRqPui7yv8diik1cWnUKABqC/unkJqbRSEmkY9gVW8DJ
> P+rdC6PUK9osqNRttnJ7AKSuQJFBV4RGnQKDfVWFB7pnFAf9Dxy3W9xoy21NJAc5
> GHB+AA/9PiNi1TUYClGI4LQnp/kMlGSeRGdtn0xRhVky/DqJehfHkZmUr8ec2Y1t
> eOBTLa7aP+Y19aaYiXZco3mXrbvsGGAJaeM+gX5CKpZHjFNAJV122FbP9smv+l/T
> Jdk10J2LJe3WtSR/ScKCPE4/ZXFG8pnEcNf3clT0nd8y2nuIdX6uOGPwyHMX5Cwr
> /IDFnuJDzy2/O5pfojFUGAfaVN+gzKRv7N2TaYXJt42FBKWfto1BFGvCxqmIIJCu
> xJDw+mLcGMfG6lximvc0mrmtOmd2CRjWfo6w12vp0/4pKyj39ZShgIT3lEg05hrC
> bLcYn+sHkoFgN8uiGjbDgpPZCsYn74HR/eoqZBgSfF0rBpOkNYfkfW4Yy8aUo8m3
> ilpJrf/Oqn54ilkD4/v18rCIju+jd4XEiQdhjKao+Bj4zP6dGbg=
> =GeOn
> -----END PGP SIGNATURE-----
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org

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


Re: svn commit: r1874468 - in /tomcat/site/trunk: docs/security-8.html xdocs/security-8.xml

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Mark,

On 2/24/20 15:46, Mark Thomas wrote:
> On 24/02/2020 20:31, Christopher Schultz wrote:
>> Mark,
>
>> Why not use the full commit id instead of a prefix? Couldn't
>> some future commit conflict with some arbitrary prefix? Or do I
>> not know what the hell I'm talking about?
>
> No, you are spot on. The reason I used the prefix is that I was
> transcribing the commit IDs by hand so the prefixes were easier.
> We probably should use the full ID or at least a longer prefix.

I wonder if we could script this: grab a prefix, find the (one and
only one) commit in the repo and expand it. If there is a conflict (or
more than one match), emit an error and continue without changing the
commit id.

When I do this kind of thing for $work, I like to write scripts that
emit sed scripts. So you process e.g. security-8.html as input, but
emit something like this as output:

s/(\b)69c5608(\b)/\169c56080fb3355507e1b55d014ec0ee6767a6150\2/g
...

You get a script that can be inspected, re-used and, even better, it
doesn't directly modify the input files. So you can even do something
like this:

$ expand-git-commit-ids.pl security-*.xml > expand.sed

$ sed -i .bak -f expand.sed security-*.xml

And then if you find other files where the same kind of thing needs to
be done, you can re-use the expand.sed script, or even (pun intended)
expand the sed script if necessary.

- -chris
-----BEGIN PGP SIGNATURE-----
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl5UPJMACgkQHPApP6U8
pFieGBAAmLLPqCvkLguhEr0aXmDfNmjYsiO6FssEHV2zjmqjM1zzDfgjI+WDwogs
ctGkcCvITq1BYCVlGxMrkMyYkTI9a8i6lILMpAOIUwNvTVKDF3AGKaMB+EMNqyY9
8qiCrWaDbVLqpsSuGn5OhRqPui7yv8diik1cWnUKABqC/unkJqbRSEmkY9gVW8DJ
P+rdC6PUK9osqNRttnJ7AKSuQJFBV4RGnQKDfVWFB7pnFAf9Dxy3W9xoy21NJAc5
GHB+AA/9PiNi1TUYClGI4LQnp/kMlGSeRGdtn0xRhVky/DqJehfHkZmUr8ec2Y1t
eOBTLa7aP+Y19aaYiXZco3mXrbvsGGAJaeM+gX5CKpZHjFNAJV122FbP9smv+l/T
Jdk10J2LJe3WtSR/ScKCPE4/ZXFG8pnEcNf3clT0nd8y2nuIdX6uOGPwyHMX5Cwr
/IDFnuJDzy2/O5pfojFUGAfaVN+gzKRv7N2TaYXJt42FBKWfto1BFGvCxqmIIJCu
xJDw+mLcGMfG6lximvc0mrmtOmd2CRjWfo6w12vp0/4pKyj39ZShgIT3lEg05hrC
bLcYn+sHkoFgN8uiGjbDgpPZCsYn74HR/eoqZBgSfF0rBpOkNYfkfW4Yy8aUo8m3
ilpJrf/Oqn54ilkD4/v18rCIju+jd4XEiQdhjKao+Bj4zP6dGbg=
=GeOn
-----END PGP SIGNATURE-----

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


Re: svn commit: r1874468 - in /tomcat/site/trunk: docs/security-8.html xdocs/security-8.xml

Posted by Mark Thomas <ma...@apache.org>.
On 24/02/2020 20:31, Christopher Schultz wrote:
> Mark,

> Why not use the full commit id instead of a prefix? Couldn't some
> future commit conflict with some arbitrary prefix? Or do I not know
> what the hell I'm talking about?

No, you are spot on. The reason I used the prefix is that I was
transcribing the commit IDs by hand so the prefixes were easier. We
probably should use the full ID or at least a longer prefix.

Mark

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


Re: svn commit: r1874468 - in /tomcat/site/trunk: docs/security-8.html xdocs/security-8.xml

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Mark,

On 2/24/20 15:14, markt@apache.org wrote:
> Author: markt Date: Mon Feb 24 20:14:04 2020 New Revision: 1874468
>
> URL: http://svn.apache.org/viewvc?rev=1874468&view=rev Log: Fix
> broken link. Need 8 chars to be unique for this one.
>
> Modified: tomcat/site/trunk/docs/security-8.html
> tomcat/site/trunk/xdocs/security-8.xml
>
> Modified: tomcat/site/trunk/docs/security-8.html URL:
> http://svn.apache.org/viewvc/tomcat/site/trunk/docs/security-8.html?re
v=1874468&r1=1874467&r2=1874468&view=diff
>
>
========================================================================
======
> --- tomcat/site/trunk/docs/security-8.html (original) +++
> tomcat/site/trunk/docs/security-8.html Mon Feb 24 20:14:04 2020 @@
> -89,7 +89,7 @@ <p>This was fixed with commits <a
> href="https://github.com/apache/tomcat/commit/69c5608">69c5608</a>,
>
>
<a href="https://github.com/apache/tomcat/commit/b962835">b962835</a>,
> -       <a
> href="https://github.com/apache/tomcat/commit/5a5494f">5a5494f</a>,
>
>
+       <a
href="https://github.com/apache/tomcat/commit/5a5494f0">5a5494f0</a>,
> <a
> href="https://github.com/apache/tomcat/commit/9be5760">9be5760</a>,
>
>
<a href="https://github.com/apache/tomcat/commit/64159aa">64159aa</a> an
d
> <a
> href="https://github.com/apache/tomcat/commit/03c4361">03c4361</a>.</p
>
>
>  Modified: tomcat/site/trunk/xdocs/security-8.xml URL:
> http://svn.apache.org/viewvc/tomcat/site/trunk/xdocs/security-8.xml?re
v=1874468&r1=1874467&r2=1874468&view=diff
>
>
========================================================================
======
> --- tomcat/site/trunk/xdocs/security-8.xml (original) +++
> tomcat/site/trunk/xdocs/security-8.xml Mon Feb 24 20:14:04 2020 @@
> -101,7 +101,7 @@ <p>This was fixed with commits <hashlink
> hash="69c5608">69c5608</hashlink>, <hashlink
> hash="b962835">b962835</hashlink>, -       <hashlink
> hash="5a5494f">5a5494f</hashlink>, +       <hashlink
> hash="5a5494f0">5a5494f0</hashlink>, <hashlink
> hash="9be5760">9be5760</hashlink>, <hashlink
> hash="64159aa">64159aa</hashlink> and <hashlink
> hash="03c4361">03c4361</hashlink>.</p>

Why not use the full commit id instead of a prefix? Couldn't some
future commit conflict with some arbitrary prefix? Or do I not know
what the hell I'm talking about?

- -chris
-----BEGIN PGP SIGNATURE-----
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl5UMpAACgkQHPApP6U8
pFicKxAAyeE1P4VXko801M+qDKgmW3GBTvd0depNjgRqFCkLmxG9KBmIL92sIRbB
5W4EGKw/C9Qg76ixrDsFjxBbpHmD0yaS1yRx7OEpRESjungH8Njg0R8lDhVKNXKL
kCfNvNTYKdKKOIaVseFpAVVE1hIvgQduiTNroxqlSjtAPc8B6BgUKio5V8SFsZ70
dUmS5U6IU4A1pdvHT88DYHvGTjBWCfoySkyi+M+eQhwz7tLcJzLF8v9+nFZBAYVX
vA3N2vWGgM9DevHRBIfpAqTbHMX3j1hPcqQlJQuwOcbk65OUnsH7Mp2LpGaWiNvh
IvE/xkqs6qSzQxmtPp8N/hL7ZUh4XyVKCiMzAnRA5SVP7gRXEMMVhRqCWef74LCq
YZj7U40rX6Uzf61a9BQR0h30RwO7MZINccvMtP5/y/P+gOYEtyuAXkmWqHFX+IXs
qTlJ3SyHPmqyCuoeyhGRi6vSMUJucEgnZKxUid3o5ojBBk5LwB3J3Yfr8jtadL1U
l+ch+XmoLRrvm4UAbhO/t6LYLUOY+Bo8a7c06fnPXEHaxKuZwQuapmpiVmcF9Z/8
Gjf2vYPMKOrRNjo2oqO5fSiZgo3ZIjFYnKRzlL3gOW9LGMmspp05C/Dv0pY+jSjf
5Pg1AUEXVOj+mT3RkUhLqYx/Xy0jUQUPtWWJOX34hWvq6n8cVr4=
=ViSr
-----END PGP SIGNATURE-----

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