kaltura / mwEmbed

Kaltura's Cross Platform Video Player ToolKit
http://player.kaltura.com
GNU Affero General Public License v3.0
210 stars 137 forks source link

fix(FEC-12600): player should support referer without scheme part #4301

Open lianbenjamin opened 2 years ago

lianbenjamin commented 2 years ago

the issue: sometimes referer header might not include "http" or "https" (i.e. kaltura.com). in this case, if kaltura.com is an allowed domain in an ACP, it will not be recognized by the player, since the player is looking for scheme part (http/s) and host part. we are using a php function called parse_url to break the referer header into url parts. in cases where the referer does not contain a scheme part (http/s), there is also no host, but path exists instead.

solution: when building the referer, adding another check for path attribute.

Solves FEC-12600

PlaykitJs-Bot commented 2 years ago

Live Pull Request Urls

giladna commented 2 years ago

@OrenMe could you please look at this PR and put your concernes if any regarding the fix as usually valid referrer should come with schema and here we try to change the behaviour