Ignore:
Timestamp:
2013-05-17T17:43:28+12:00 (11 years ago)
Author:
ak19
Message:
  1. Handling quotes and colons in user comments: since these are sent and retrieved from metadata-server.pl as JSON strings, the quotes and colons in user-added meta needs to be protected since JSON uses these characters for packaging up data. 2. Cosmetic changes to baseaction: clarified some comments.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/cgiactions/baseaction.pm

    r27349 r27366  
    294294       
    295295        my ($year,$mon,$mday,$hour,$min,$sec) = split(/[\s\/:]+/, $keycreation_time); # split by space, /, :
     296                           # (also ensures whitespace surrounding keycreateion_time is trimmed)
    296297        my $key_timestamp = timelocal($sec,$min,$hour,$mday,$mon-1,$year);
    297298       
     
    321322    # The following code which tests whether the user is in the required group
    322323    # seems to have been copied over from gliserver.pl.
    323     # But for metadata-server.pl, when user comments are added through the set-metadata functions,
     324    # But when user comments are added through the set-metadata functions for metadata-server.pl
     325    # (which is the first feature for which baseaction::authenticate_user() is actually used)
    324326    # the user doesn't need to be a specific collection's editor in order to add comments to that collection.
    325327    # So we no longer check the user is in the group here.
Note: See TracChangeset for help on using the changeset viewer.