Changeset c39bfe9


Ignore:
Timestamp:
10/08/2023 08:04:48 AM (8 months ago)
Author:
Xi Ruoyao <xry111@…>
Branches:
12.1, 12.1-rc1, multilib, trunk, xry111/arm64, xry111/clfs-ng, xry111/loongarch, xry111/loongarch-12.1, xry111/mips64el, xry111/update-glibc
Children:
15b9db4, 91c6e9b
Parents:
d42ea8f
Message:

currency: Do not run strip_tags on api.github.com output

The output of api.github.com is JSON, thus we should not remove every
<...> for it. For example, strip_tags had trimmed the JSON for
shadow-4.14.1, leading to "Attempt to read property "tag_name" on null".

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lfs-latest-git.php

    rd42ea8f rc39bfe9  
    8686  exec( "curl --location --silent --max-time 30 $url", $dir );
    8787
    88   $s   = implode( "\n", $dir );
    89   $dir = strip_tags( $s );
     88  $dir = implode( "\n", $dir );
     89  if ( !preg_match( "/api.github.com/", $url) )
     90    $dir = strip_tags( $dir );
    9091  return explode( "\n", $dir );
    9192}
Note: See TracChangeset for help on using the changeset viewer.