Skip to content

Conversation

@MaimanaGhnem
Copy link
Collaborator

Pull Request Checklist

Please complete the following before submitting:

General notes -

  • I have tested the changes locally.
  • I have written unit tests where applicable.
  • I have updated documentation where needed.
  • I have added comments to complex code.
  • This PR follows the coding style guidelines.
  • I have updated release notes with new feature

New Kaltura Types

  • I have created new clients
  • I have notified related apps - KMCNG / KMS / EP .... about new clients

New Kaltura Services / Actions

  • I have added a deployment script

Questions

  1. What is the purpose of this PR?

    • Enter your answer here
  2. Does this change affect production code or infrastructure?

    • Yes
    • No
  3. If yes, what is the rollback plan?

    • Enter your answer here

@MaimanaGhnem MaimanaGhnem requested a review from Copilot December 10, 2025 20:22
@github-actions
Copy link

@github-copilot suggest

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enforces HTTPS protocol for thumbnail URLs when a partner has the enforceHttpsApi flag enabled. The change ensures that entries belonging to partners requiring HTTPS will have their thumbnail URLs generated with the HTTPS protocol.

  • Adds partner-level HTTPS enforcement check for thumbnail URL generation
  • Passes protocol parameter to getThumbnailUrl() when HTTPS is enforced

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link

@github-copilot suggest

@github-actions
Copy link

@github-copilot suggest

else
{
$assetUrl = kAssetUtils::getAssetUrl($thumbAsset);
$assetUrl = self::enforceHttpsIfRequired($thumbAsset->getPartnerId(),$assetUrl);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing space after come

{
$cdnUrl = $cdnUrlPartners[$thumbAsset->getPartnerId()];
$assetUrl = kAssetUtils::getAssetUrl($thumbAsset, false, null, null, '', $cdnUrl);
$assetUrl = self::enforceHttpsIfRequired($thumbAsset->getPartnerId(),$assetUrl);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing space after come

$partner = PartnerPeer::retrieveByPK($partnerId);
if ($partner && $partner->getEnforceHttpsApi())
{
$url = str_replace('http://', 'https://', $url);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In case the URL contains http:// more than once, better limit it to the first occurance
if (strpos($url, 'http://') === 0)
{
$url = 'https://' . substr($url, 7);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants