Changeset 27811 for trunk/admin/themes


Ignore:
Timestamp:
Mar 17, 2014, 11:20:28 PM (11 years ago)
Author:
plg
Message:

merge r27810 from branch 2.6 to trunk

bug 3055: add security pwg_token on API methods introduced in Piwigo 2.6
(pwg.groups.addUser, pwg.groups.deleteUser, pwg.groups.setInfo, pwg.users.add,
pwg.users.setInfo, pwg.permissions.add, pwg.permissions.remove)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/themes/default/template/user_list.tpl

    r26270 r27811  
    5757      url: "ws.php?format=json&method=pwg.users.add",
    5858      type:"POST",
    59       data: jQuery(this).serialize(),
     59      data: jQuery(this).serialize()+"&pwg_token="+pwg_token,
    6060      beforeSend: function() {
    6161        jQuery("#addUserForm .errors").hide();
     
    346346      type:"POST",
    347347      data: {
     348        pwg_token:pwg_token,
    348349        user_id:userId,
    349350        password: jQuery('#user'+userId+' .changePassword input[type=text]').val()
     
    397398      type:"POST",
    398399      data: {
     400        pwg_token:pwg_token,
    399401        user_id:userId,
    400402        username: jQuery('#user'+userId+' .changeUsername input[type=text]').val()
     
    468470
    469471    var formData = jQuery('#user'+userId+' form').serialize();
     472    formData += '&pwg_token='+pwg_token;
    470473
    471474    if (jQuery('#user'+userId+' form select[name="group_id[]"] option:selected').length == 0) {
     
    709712    var method = 'pwg.users.setInfo';
    710713    var data = {
     714      pwg_token: pwg_token,
    711715      user_id: selection
    712716    };
     
    719723        }
    720724        method = 'pwg.users.delete';
    721         data.pwg_token = pwg_token;
    722725        break;
    723726      case 'group_associate':
Note: See TracChangeset for help on using the changeset viewer.