From 58beea9798678ad5cc6c0dd43604f5d8b8d4d5e8 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Tue, 2 Dec 2008 22:26:32 -0500 Subject: check for license compatibility darcs-hash:20081203032632-5ed1f-2213efd018913e3253082dbe83d7b906c4f0ff76.gz --- actions/userauthorization.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'actions') diff --git a/actions/userauthorization.php b/actions/userauthorization.php index 11e2d7135..96df8d146 100644 --- a/actions/userauthorization.php +++ b/actions/userauthorization.php @@ -449,6 +449,10 @@ class UserauthorizationAction extends Action { if (!common_valid_http_url($license)) { throw new OAuthException("Invalid license URL '$license'."); } + $site_license = common_config('license', 'url'); + if (!common_compatible_license($license, $site_license)) { + throw new OAuthException("Listenee stream license '$license' not compatible with site license '$site_license'."); + } # optional stuff $fullname = $req->get_parameter('omb_listenee_fullname'); if ($fullname && strlen($fullname) > 255) { -- cgit v1.2.3-54-g00ecf