SEARCH RESULTS
 
Showing 1-10 of 22 records
 
Expand article

Better exception reporting in ASP.NET part 2

2008-08-04 14:11:14 by keith-brown in Security Briefs
 
...void Initialize( string name, NameValueCollection config) { base .Initialize(name, config); to = GetAndRemoveStringAttribute(config, "to" , true ); from = GetAndRemoveStringAttribute(config, "from" , true ); subjectPrefix = GetAndRemoveStringAttribute(config, "subjectPrefix" , false ); } public override void ProcessEvent(WebBaseEvent...
 
 
 
 
 
Expand article

PrincipalPermissionAttribute and Static ctor Leads to DoS

2007-12-03 09:03:00 by Keith Brown in Security Briefs
 
...void Main(string[] args becomeSuperUser tryUsingSensitiveClass becomeNormalUser tryUsingSensitiveClass static void tryUsingSensitiveClass try new Sensitive Console.WriteLine("{0} OK Thread.CurrentPrincipal.Identity.Name catch (Exception x Console.WriteLine 0} failed due to a {1 Thread.CurrentPrincipal.Identity.Name x.GetType().Name static...
 
 
 
 
 
Expand article

Serializable XmlDocument

The Article has images
2008-08-19 02:58:00 by keith-brown in Security Briefs
...void GetObjectData(SerializationInfo info StreamingContext context byte [] serializedData = null if ( null != Value serializedData = Serialize(Value info.AddValue( "doc" , serializedData endregion region implicit conversion to/from XmlDocument public static implicit operator SerializableXmlDocument XmlDocument doc return new...
 
 
 
 
 
Expand article

PasswordTextBox

2008-10-29 19:49:54 by keith-brown in Security Briefs
 
...void OnInit(EventArgs e) { base .OnInit(e); Page.RegisterRequiresControlState( this ); } protected override object SaveControlState() { byte [] encryptedPassword = ProtectPassword(password); object baseControlState = base .SaveControlState(); if ( null == baseControlState) return encryptedPassword; else return new Pair(baseControlState,...
 
 
 
 
 
Expand article

Enabling hierarchical nant builds

2008-03-07 05:49:00 by Keith Brown in Security Briefs
 
...void ExecuteTask() { string searchDir = this.Project.BaseDirectory; do { if (MarkerFileExistsIn(searchDir)) { this.Project.Properties[PropertyName] = searchDir; return; } searchDir = ParentOf(searchDir); } while (!IsRootDirectory(searchDir)); } private bool IsRootDirectory(string path) { return Path.GetPathRoot(path) ==...
 
 
 
 
 
Expand article

When does Declarative Data Binding Happen?

2008-05-29 07:31:00 by Keith Brown in Security Briefs
 
...voided declarative data binding when I ran into this problem and used programmatic data binding instead (control.DataSource=collection; control.DataBind; control.SelectedIndex=whatever But today I talked with Fritz Onion , ASP.NET guru, and we figured out when declarative data binding actually occurs. We tested LoadComplete, and that wasn't...
 
 
 
 
 
Expand article

When does Declarative Data Binding Happen?

2008-05-29 13:31:00 by keith-brown in Security Briefs
 
...voided declarative data binding when I ran into this problem and used programmatic data binding instead (control.DataSource=collection; control.DataBind; control.SelectedIndex=whatever But today I talked with Fritz Onion , ASP.NET guru, and we figured out when declarative data binding actually occurs. We tested LoadComplete, and that wasn't...
 
 
 
 
 
Expand article

Enabling hierarchical nant builds

2008-03-07 12:49:00 by keith-brown in Security Briefs
 
...void ExecuteTask() { string searchDir = this.Project.BaseDirectory; do { if (MarkerFileExistsIn(searchDir)) { this.Project.Properties[PropertyName] = searchDir; return; } searchDir = ParentOf(searchDir); } while (!IsRootDirectory(searchDir)); } private bool IsRootDirectory(string path) { return Path.GetPathRoot(path) ==...
 
 
 
 
 
Expand article

When does Declarative Data Binding Happen?

2008-05-29 13:31:00 by keith-brown in Security Briefs
 
...voided declarative data binding when I ran into this problem and used programmatic data binding instead (control.DataSource=collection; control.DataBind; control.SelectedIndex=whatever But today I talked with Fritz Onion , ASP.NET guru, and we figured out when declarative data binding actually occurs. We tested LoadComplete, and that wasn't...
 
 
 
 
 
Expand article

Enabling hierarchical nant builds

2008-03-07 12:49:00 by keith-brown in Security Briefs
 
...void ExecuteTask() { string searchDir = this.Project.BaseDirectory; do { if (MarkerFileExistsIn(searchDir)) { this.Project.Properties[PropertyName] = searchDir; return; } searchDir = ParentOf(searchDir); } while (!IsRootDirectory(searchDir)); } private bool IsRootDirectory(string path) { return Path.GetPathRoot(path) ==...