Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix for TR-2068 #6658

Merged
merged 1 commit into from
Jan 17, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions alpha/apps/kaltura/lib/KSecureEntryHelper.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,14 @@ class KSecureEntryHelper
* @var array
*/
private $actionLists = array();



/**
* Array containing trusted admministrative partner IDs
* @var array
*/
protected static $trustedPartnerIds = array (Partner::BATCH_PARTNER_ID);

/**
*
* @param entry $entry
Expand Down Expand Up @@ -341,11 +348,16 @@ protected function validateKs()
$valid = $ks->isValidForPartner($ks->partner_id);
}
if ($valid === ks::EXPIRED)
{
KExternalErrors::dieError(KExternalErrors::KS_EXPIRED, "This URL is expired");
}
else if ($valid === ks::INVALID_PARTNER)
{
if ($this->hasRules()) // TODO - for now if the entry doesnt have restrictions any way disregard a partner group check
if (!in_array($ks->partner_id, self::$trustedPartnerIds) && $this->hasRules())
{
// TODO - for now if the entry doesnt have restrictions any way disregard a partner group check
KExternalErrors::dieError(KExternalErrors::INVALID_PARTNER, "Invalid session [".$valid."]");
}
}
else if ($valid === ks::EXCEEDED_RESTRICTED_IP)
{
Expand Down