[buddypress-trac] [BuddyPress] #4761: Modify ajax url to work properly with FORCE_SSL_ADMIN

buddypress-trac noreply at wordpress.org
Wed Feb 13 19:45:28 UTC 2013


#4761: Modify ajax url to work properly with FORCE_SSL_ADMIN
---------------------------------+---------------------
 Reporter:  will_c               |       Owner:
     Type:  defect (bug)         |      Status:  closed
 Priority:  normal               |   Milestone:  1.7
Component:  Core                 |     Version:  1.7
 Severity:  normal               |  Resolution:  fixed
 Keywords:  dev-feedback commit  |
---------------------------------+---------------------
Changes (by r-a-y):

 * status:  new => closed
 * resolution:   => fixed


Comment:

 (In [6790]) Use network_site_url() to build the 'ajaxurl' JS variable.

 Previously, for sites on HTTPS and using the 'FORCE_SSL_ADMIN' constant,
 when viewing the frontend of the site on HTTP, the 'ajaxurl' JS
 variable would still use HTTPS due to the usage of admin_url().

 This would break most BP AJAX actions that use check_admin_referer() to
 verify the nonce.

 Switching admin_url() to use network_site_url() fixes this problem.

 Fixes #4761.  Props will_c.

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/4761#comment:7>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list