-
Notifications
You must be signed in to change notification settings - Fork 395
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Block Cathay Pacific access to API #1447
- Loading branch information
Showing
1 changed file
with
9 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,7 +26,15 @@ | |
$action = $_POST["action"]; | ||
$apid = $_POST["apid"]; | ||
|
||
$uid = $_SESSION["uid"] ?? null; | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong. |
||
// https://github.com/jpatokal/openflights/issues/1447 | ||
$ref = $_SERVER['HTTP_REFERER']; | ||
if (strpos($ref, 'com.cathaypacific.iJourneyLite') !== FALSE) { | ||
die( | ||
json_encode( | ||
["status" => 0, "message" => "Cathay Pacific iJourneyLite is not licensed to use this API. Please contact [email protected] to resolve this."] | ||
) | ||
); | ||
} | ||
|
||
if ($action == "RECORD") { | ||
if (!$uid || empty($uid)) { | ||
|
Don't think this line should've been removed,
$uid
is used down on line 40 (after this patch)