mark: A photo of Mark kneeling on top of the Taal Volcano in the Philippines. It was a long hike. (Default)
Mark Smith ([staff profile] mark) wrote in [site community profile] changelog2009-10-26 04:55 am

[dw-free] crossposted entries can't be edited by a client

[commit: http://hg.dwscoalition.org/dw-free/rev/d2eaa09e9a15]

http://bugs.dwscoalition.org/show_bug.cgi?id=1175

Don't send the xpost property to clients, and this is a system property.
Don't let the user change it.

Patch by [staff profile] mark.

Files modified:
  • bin/upgrading/proplists.dat
  • cgi-bin/ljprotocol.pl
--------------------------------------------------------------------------------
diff -r e740280188dc -r d2eaa09e9a15 bin/upgrading/proplists.dat
--- a/bin/upgrading/proplists.dat	Mon Oct 26 04:42:18 2009 +0000
+++ b/bin/upgrading/proplists.dat	Mon Oct 26 04:55:23 2009 +0000
@@ -1347,7 +1347,7 @@ logproplist.xpost:
   des: Maps to crossposts of this entry on other sites
   prettyname: Crosspost
   sortorder: 105
-  ownership: user
+  ownership: system
 
 usermsgproplist.userpic:
   des: Userpic chosen by the user who created the message
diff -r e740280188dc -r d2eaa09e9a15 cgi-bin/ljprotocol.pl
--- a/cgi-bin/ljprotocol.pl	Mon Oct 26 04:42:18 2009 +0000
+++ b/cgi-bin/ljprotocol.pl	Mon Oct 26 04:55:23 2009 +0000
@@ -2221,6 +2221,10 @@ sub getevents
             # replycounts cease being transferred in props
             delete $props{$itemid}->{'replycount'};
 
+            # the xpost property is not something we should be distributing
+            # as it's a serialized string and confuses clients
+            delete $props{$itemid}->{xpost};
+
             my $evt = $evt_from_itemid{$itemid};
             $evt->{'props'} = {};
             foreach my $name (keys %{$props{$itemid}}) {
--------------------------------------------------------------------------------