bugFreeciv - Bugs: bug #21296, Savegame loading doesn't honour...

 
 
Show feedback again

bug #21296: Savegame loading doesn't honour REVEAL_MAP_DEAD

Submitted by:  Jacob Nevins <jtn>
Submitted on:  Sat 23 Nov 2013 08:47:25 PM UTC  
 
Category: generalSeverity: 3 - Normal
Priority: 5 - NormalStatus: Fixed
Assigned to: Marko Lindqvist <cazfi>Open/Closed: Closed
Release: Operating System: Any
Planned Release: 2.5.4, 2.6.0, 3.0.0

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Tue 12 Apr 2016 08:37:56 PM UTC, SVN revision 32370:

Stop loading saved game from revealing entire map to such dead players for whom
it should not be shown according to 'revealmap' setting.

Reported by Jacob Nevins

See bug #21296

(Browse SVN revision 32370)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Tue 12 Apr 2016 08:37:49 PM UTC, SVN revision 32369:

Stop loading saved game from revealing entire map to such dead players for whom
it should not be shown according to 'revealmap' setting.

Reported by Jacob Nevins

See bug #21296

(Browse SVN revision 32369)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Tue 12 Apr 2016 08:37:40 PM UTC, SVN revision 32368:

Stop loading saved game from revealing entire map to such dead players for whom
it should not be shown according to 'revealmap' setting.

Reported by Jacob Nevins

See bug #21296

(Browse SVN revision 32368)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Tue 01 Mar 2016 01:50:41 PM UTC, comment #4:

Saving the map information for dead players -> patch #7029
Revealing map also to teams once all members have died -> patch #7030

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Tue 01 Mar 2016 02:46:33 AM UTC, comment #3:

Attached fix makes the minimum change to stop the information leak.

(file #26901, file #26902)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Tue 01 Mar 2016 02:28:51 AM UTC, comment #2:

> prevents the map being revealed for dead members of teams;
> again, this doesn't seem to be checked here


Here it would probably make more sense to check that there's nobody alive in the team rather than checking that player never was in any team (-> that team consist of the player alone)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Thu 21 Jan 2016 05:15:16 AM UTC, comment #1:

Even if we can't show correct map for dead players, the intention of disabled REVEAL_MAP_DEAD is clearly to prohibit knowledge leak -> it would be better to show nothing than everything.

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Sat 23 Nov 2013 08:47:25 PM UTC, original submission:

In savegame.c:player_load_vision() and savegame2.c:sg_load_player_vision(), map_know_and_see_all() is called unconditionally for dead players, even if the 'revealmap' option doesn't allow dead players to see the map.

(Also, the normal check in kill_player() prevents the map being revealed for dead members of teams; again, this doesn't seem to be checked here.)

The system seems to take full advantage of the assumption that dead players get to see the whole map (as they always used to): savegame2.c:sg_save_player_vision() doesn't bother to save anything for dead players. So, the fix isn't straightforward; there'll need to be special handling for old savegames.
(I don't know if there's some reason it's hard to save the player map for dead players -- perhaps stuff was thrown away or became invalid when they died?)

Jacob Nevins <jtn>
Project Administrator

 

(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by cazfi (Posted a comment)
  • -unavailable- added by jtn (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Error: not logged in

     

     

    Follow 9 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 12 Apr 2016 08:38:07 PM UTCcazfiStatusReady For Test=>Fixed
      Assigned toNone=>cazfi
      Open/ClosedOpen=>Closed
    Tue 01 Mar 2016 02:46:33 AM UTCcazfiAttached File-=>Added NoMapForLoadedNonRevealPlrs.patch, #26901
      Attached File-=>Added NoMapForLoadedNonRevealPlrs-S2_6.patch, #26902
      CategoryNone=>general
      StatusNone=>Ready For Test
    Wed 03 Feb 2016 11:53:53 PM UTCcazfiPlanned Release2.5.3, 2.6.0, 3.0.0=>2.5.4, 2.6.0, 3.0.0
    Thu 21 Jan 2016 05:15:16 AM UTCcazfiPlanned Release=>2.5.3, 2.6.0, 3.0.0
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup