Changeset 21584 for extensions/oAuth/include
- Timestamp:
- Mar 15, 2013, 6:43:07 PM (11 years ago)
- Location:
- extensions/oAuth/include
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/oAuth/include/providers_stats.inc.php
r20368 r21584 7 7 'require_client_id' => true, 8 8 'new_app_link' => 'https://developers.facebook.com/apps', 9 'userguide_section' => 'http://hybridauth.sourceforge.net/userguide/IDProvider_info_Facebook.html',10 9 'scope' => 'email', 11 10 ), … … 17 16 'require_client_id' => true, 18 17 'new_app_link' => 'https://code.google.com/apis/console', 19 'userguide_section' => 'http://hybridauth.sourceforge.net/userguide/IDProvider_info_Google.html',20 18 'scope' => 'https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email', 21 19 ), … … 26 24 'require_client_id' => true, 27 25 'new_app_link' => 'http://instagram.com/developer/clients/manage', 28 'userguide_section' => null,29 26 ), 30 27 'LinkedIn' => array( … … 32 29 'provider_name' => 'LinkedIn', 33 30 'new_app_link' => 'https://www.linkedin.com/secure/developer', 34 'userguide_section' => 'http://hybridauth.sourceforge.net/userguide/IDProvider_info_LinkedIn.html',35 31 ), 36 32 'Tumblr' => array( … … 38 34 'provider_name' => 'Tumblr', 39 35 'new_app_link' => 'http://www.tumblr.com/oauth/apps', 40 'userguide_section' => 'http://hybridauth.sourceforge.net/userguide/IDProvider_info_Tumblr.html',41 36 ), 42 37 'Twitter' => array( … … 44 39 'provider_name' => 'Twitter', 45 40 'new_app_link' => 'https://dev.twitter.com/apps', 46 'userguide_section' => 'http://hybridauth.sourceforge.net/userguide/IDProvider_info_Twitter.html',47 41 ), 48 42 'Live' => array( … … 51 45 'require_client_id' => true, 52 46 'new_app_link' => 'https://manage.dev.live.com/ApplicationOverview.aspx', 53 'userguide_section' => 'http://hybridauth.sourceforge.net/userguide/IDProvider_info_Live.html',54 47 ), 55 48 'Yahoo' => array( … … 57 50 'provider_name' => 'Yahoo!', 58 51 'new_app_link' => 'https://developer.apps.yahoo.com/projects/', 59 'userguide_section' => 'http://hybridauth.sourceforge.net/userguide/IDProvider_info_Yahoo.html',60 52 ), 61 53 'OpenID' => array( … … 63 55 'provider_name' => 'OpenID', 64 56 'new_app_link' => null, 65 'userguide_section' => 'http://hybridauth.sourceforge.net/userguide/IDProvider_info_OpenID.html',66 57 ), 67 58 'Flickr' => array( … … 69 60 'provider_name' => 'Flickr', 70 61 'new_app_link' => null, 71 'userguide_section' => 'http://hybridauth.sourceforge.net/userguide/IDProvider_info_OpenID.html',72 62 ), 73 63 'Wordpress' => array( … … 75 65 'provider_name' => 'Wordpress', 76 66 'new_app_link' => null, 77 'userguide_section' => 'http://hybridauth.sourceforge.net/userguide/IDProvider_info_OpenID.html',78 67 ), 79 68 ); -
extensions/oAuth/include/public_events.inc.php
r21325 r21584 61 61 $adapter = $hybridauth->authenticate($provider); 62 62 $remote_user = $adapter->getUserProfile(); 63 64 // security, check remote identifier 65 if ($remote_user->identifier != $user_identifier) 66 { 67 pwg_unset_session_var('oauth_new_user'); 68 throw new Exception('Hacking attempt!'); 69 } 63 70 64 71 $template->assign(array( … … 73 80 74 81 $oauth_id = $provider.'---'.$remote_user->identifier; 75 76 // security, check remote identifier77 if ($remote_user->identifier != $user_identifier)78 {79 pwg_unset_session_var('oauth_new_user');80 throw new Exception('Hacking attempt!');81 }82 82 83 83 // form submited … … 96 96 $user_id = get_userid($_POST['login']); 97 97 98 // u dpdate oauth field98 // update oauth field 99 99 $query = ' 100 100 UPDATE '.USERS_TABLE.' … … 235 235 $template->assign('REDIRECT_TO', get_gallery_home_url()); 236 236 237 $template->set_prefilter('menubar', 'oauth_add_menubar_buttons ');237 $template->set_prefilter('menubar', 'oauth_add_menubar_buttons_prefilter'); 238 238 } 239 239 … … 254 254 $add = 'disabled="disabled" '; 255 255 $script = ' 256 {footer_script} {literal}256 {footer_script} 257 257 jQuery("input[type=\'password\'], input[name=\'send_password_by_mail\']").parent("li").css("display", "none"); 258 {/ literal}{/footer_script}';258 {/footer_script}'; 259 259 260 260 $content = str_replace($search, $search.$add, $content); … … 269 269 } 270 270 271 function oauth_add_menubar_buttons ($content)271 function oauth_add_menubar_buttons_prefilter($content) 272 272 { 273 273 $search = '{include file=$block->template|@get_extent:$id }';
Note: See TracChangeset
for help on using the changeset viewer.