From: Ari Johnson Date: Thu, 14 Feb 2008 16:05:50 +0000 (+0000) Subject: Fixed can_write_attr_internal() to prohibit writing attributes that the player cannot... X-Git-Tag: 0.72p4~4 X-Git-Url: https://git.theari.com/?a=commitdiff_plain;h=4556401792e9f39269ad5343e84cc41f973c410b;p=cobramush.git Fixed can_write_attr_internal() to prohibit writing attributes that the player cannot read (cherry picked from commit c7dfe1f2725598c996254217e16e3b41ff42ee2e) --- diff --git a/game/txt/changes/0.72p4 b/game/txt/changes/0.72p4 index f8c1a38..f4f0892 100644 --- a/game/txt/changes/0.72p4 +++ b/game/txt/changes/0.72p4 @@ -29,4 +29,6 @@ CobraMUSH Version 0.72p4 * Fixed possible crash in trim_space_sep() [AEJ] * Fixed attribute flag mortal_dark [AEJ] * Fixed attribute read locks [AEJ] + * Fixed can_write_attr_internal() to prohibit writing attributes that + the player cannot read [AEJ] diff --git a/src/attrib.c b/src/attrib.c index 31087d1..42dce70 100644 --- a/src/attrib.c +++ b/src/attrib.c @@ -2173,6 +2173,8 @@ can_write_attr_internal(dbref player, dbref obj, ATTR * atr, int safe) { char *p; missing_name[0] = '\0'; + if (!can_read_attr_internal(player, obj, atr)) + return 0; if (Cannot_Write_This_Attr(player, atr, obj, safe, !atr_match(atr->name), AL_CREATOR(atr))) return 0; strcpy(missing_name, AL_NAME(atr));