Exemple #1
0
 internal static void CheckSecurity(RubyContext /*!*/ context, object self, string message)
 {
     if (context.CurrentSafeLevel >= 4 && context.IsObjectTainted(self))
     {
         throw RubyExceptions.CreateSecurityError("Insecure: " + message);
     }
 }
Exemple #2
0
 internal static void CheckSecurity(RubyContext/*!*/ context, object self, string message) {
     if (context.CurrentSafeLevel >= 4 && context.IsObjectTainted(self)) {
         throw RubyExceptions.CreateSecurityError("Insecure: " + message);
     }
 }
Exemple #3
0
 public static RubyArray/*!*/ ToA(RubyContext/*!*/ context, object self) {
     RubyArray result = new RubyArray();
     result.Add(self);
     result.IsTainted |= context.IsObjectTainted(self);
     return result;
 }
Exemple #4
0
 public static bool Tainted(RubyContext/*!*/ context, object self) {
     if (RubyUtils.IsRubyValueType(self)) {
         return false; // can't taint value types
     }
     return context.IsObjectTainted(self);
 }
Exemple #5
0
 /// <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);
 }