Korin API

EntryName
in package

FinalYes

Names of archive entries that are safe to use: relative paths with "/" between segments, none of them "." or "..", no backslash, drive letter or control character. Anything else could write or read outside a directory the archive is extracted to (zip-slip).

Table of Contents

Constants

DOCUMENT  : mixed = 'gedcom.ged'

Methods

isSafe()  : bool
ofReference()  : string|null
The entry a FILE reference names, null for a reference that is not a relative path (a URL, "/x", "//host/x"). References are URIs: "a%20b.jpg" is the entry "a b.jpg".

Constants

DOCUMENT

public mixed DOCUMENT = 'gedcom.ged'

Methods

isSafe()

public static isSafe(string $name) : bool
Parameters
$name : string
Return values
bool

ofReference()

The entry a FILE reference names, null for a reference that is not a relative path (a URL, "/x", "//host/x"). References are URIs: "a%20b.jpg" is the entry "a b.jpg".

public static ofReference(string $reference) : string|null
Parameters
$reference : string
Return values
string|null
On this page

Search results