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-Url: https://git.theari.com/?a=commitdiff_plain;h=70375a71607f3d51889feb3231b6504678a87bea;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 7958479..3c7c7a6 100644 --- a/src/attrib.c +++ b/src/attrib.c @@ -2231,6 +2231,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));