ZIP Slip - File Generation Sample Code by PHP
Sample Code
<?php
$zip = new ZipArchive();
$filename = "./zip-slip-test.zip";
<?php
$zip = new ZipArchive();
$filename = "./zip-slip-test.zip";
/**
* @see https://docs.oracle.com/javase/8/docs/api/java/net/URLConnection.html
* @see https://docs.oracle.com/javase/8/docs/api/java/net/HttpURLConnection.html
* @see https://www.baeldung.com/java-http-request
*/
App | Andriod URL Scheme |
App link | iOS URL Scheme |
Universal link |
---|---|---|---|---|
LINE | line:// | https://lin.ee/f6fcOKR | line:// | https://lin.ee/f6fcOKR |
LINE LIFF | line://app/1431716824-lWG5eryW?to=/cgm | https://liff.line.me/1431716824-lWG5eryW?to=/cgm | line://app/1431716824-lWG5eryW?to=/cgm | https://liff.line.me/1431716824-lWG5eryW?to=/cgm |
UberEats | ubereats:// | https://www.ubereats.com | ubereats:// | https://www.ubereats.com |
Chrome | chrome:// | chrome:// |
CURL parameter --max-time
includes --connect-timeout
to separate the timeout of the handshake phase.
CURL - Timeouts · Everything curl
In addition, CURL can distinguish timeout errors at different stages: "connection timeout" and "operation timeout".
For example, CURL command with 5 second connection timeout and 25 second maximum timeout setting:
The public key file (key.pub
) contains the binary key that is packaged into a base64 string.
The public key's fingerprint formula:
# SHA256
Add server variable condition for ./web/index.php
& ./yii
:
if (isset($_SERVER['APP_ENV']) && $_SERVER['APP_ENV']=='production') {
Like PHP's htmlentities()/htmlspecialchars() functions, JavaScript is easy to implement it.
/**
The exchange of new line & br HTML tag could refer to PHP - nl2br() function, which uses to inserts HTML line breaks before all newlines in a string.
These JavaScript functions consider whether to use insert or replace to handle the swap.