vadvs (vadvs) wrote in changelog,
vadvs
vadvs
changelog

[ljcom] r11585: LJSUP-11431: Allow partners to post entr...

Committer: vad
LJSUP-11431: Allow partners to post entries to LJ via XML-RPC and specify a corresponding docid (entry id on a partners site)
add some checks.
U   trunk/cgi-bin/LJ/Hooks/SUP.pm
Modified: trunk/cgi-bin/LJ/Hooks/SUP.pm
===================================================================
--- trunk/cgi-bin/LJ/Hooks/SUP.pm	2012-03-13 13:02:10 UTC (rev 11584)
+++ trunk/cgi-bin/LJ/Hooks/SUP.pm	2012-03-13 18:27:13 UTC (rev 11585)
@@ -953,8 +953,14 @@
 
     my $partner = LJ::PartnerSite->find_by_api_key($rsk);
     return unless $partner;
+
     my $entry = $arg->{entry};
     return unless $entry;
+
+    my $journal = $entry->journal;
+    return unless $journal;
+    return unless $journal->username eq $partner->journal_username;
+
     $partner->replace_mapping($entry, $docid);
 
 });

Tags: ljcom, pm, vad, vadvs
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments