internal static void CheckSecurity(RubyContext /*!*/ context, object self, string message) { if (context.CurrentSafeLevel >= 4 && context.IsObjectTainted(self)) { throw RubyExceptions.CreateSecurityError("Insecure: " + message); } }
internal static void CheckSecurity(RubyContext/*!*/ context, object self, string message) { if (context.CurrentSafeLevel >= 4 && context.IsObjectTainted(self)) { throw RubyExceptions.CreateSecurityError("Insecure: " + message); } }
public static RubyArray/*!*/ ToA(RubyContext/*!*/ context, object self) { RubyArray result = new RubyArray(); result.Add(self); result.IsTainted |= context.IsObjectTainted(self); return result; }
public static bool Tainted(RubyContext/*!*/ context, object self) { if (RubyUtils.IsRubyValueType(self)) { return false; // can't taint value types } return context.IsObjectTainted(self); }
/// <summary> /// Makes this string tainted if the specified string is tainted. /// </summary> public MutableString /*!*/ TaintBy(object /*!*/ obj, RubyContext /*!*/ context) { IsTainted |= context.IsObjectTainted(obj); return(this); }