]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
check for license compatibility
authorEvan Prodromou <evan@controlyourself.ca>
Wed, 3 Dec 2008 03:26:32 +0000 (22:26 -0500)
committerEvan Prodromou <evan@controlyourself.ca>
Wed, 3 Dec 2008 03:26:32 +0000 (22:26 -0500)
darcs-hash:20081203032632-5ed1f-2213efd018913e3253082dbe83d7b906c4f0ff76.gz

actions/userauthorization.php

index 11e2d7135956d7fa1ae097c6bcb2f1f5ec8e553b..96df8d146e42f530906dfb1a2ecdb71548ac628e 100644 (file)
@@ -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) {