Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing SecurityCritical attribute on GetObjectData() overrides #1493

Merged
merged 1 commit into from
Oct 16, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Octokit/Exceptions/ApiException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Diagnostics.CodeAnalysis;
using System.Net;
using System.Runtime.Serialization;
using System.Security;
using Octokit.Internal;

namespace Octokit
Expand Down Expand Up @@ -158,6 +159,7 @@ protected ApiException(SerializationInfo info, StreamingContext context)
ApiError = (ApiError) info.GetValue("ApiError", typeof(ApiError));
}

[SecurityCritical]
public override void GetObjectData(SerializationInfo info, StreamingContext context)
{
base.GetObjectData(info, context);
Expand Down
2 changes: 2 additions & 0 deletions Octokit/Exceptions/RateLimitExceededException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.Serialization;
using System.Security;

namespace Octokit
{
Expand Down Expand Up @@ -94,6 +95,7 @@ protected RateLimitExceededException(SerializationInfo info, StreamingContext co
?? new RateLimit(new Dictionary<string, string>());
}

[SecurityCritical]
public override void GetObjectData(SerializationInfo info, StreamingContext context)
{
base.GetObjectData(info, context);
Expand Down
2 changes: 2 additions & 0 deletions Octokit/Exceptions/RepositoryExistsException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.Runtime.Serialization;
using System.Security;

namespace Octokit
{
Expand Down Expand Up @@ -117,6 +118,7 @@ protected RepositoryExistsException(SerializationInfo info, StreamingContext con
ExistingRepositoryWebUrl = (Uri) info.GetValue("ExistingRepositoryWebUrl", typeof(Uri));
}

[SecurityCritical]
public override void GetObjectData(SerializationInfo info, StreamingContext context)
{
base.GetObjectData(info, context);
Expand Down
2 changes: 2 additions & 0 deletions Octokit/Exceptions/RepositoryFormatException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.Runtime.Serialization;
using System.Security;

namespace Octokit
{
Expand Down Expand Up @@ -51,6 +52,7 @@ protected RepositoryFormatException(SerializationInfo info, StreamingContext con
message = info.GetString("Message");
}

[SecurityCritical]
public override void GetObjectData(SerializationInfo info, StreamingContext context)
{
base.GetObjectData(info, context);
Expand Down
2 changes: 2 additions & 0 deletions Octokit/Exceptions/RepositoryWebHookConfigException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System.Globalization;
using System.Linq;
using System.Runtime.Serialization;
using System.Security;

namespace Octokit
{
Expand Down Expand Up @@ -48,6 +49,7 @@ protected RepositoryWebHookConfigException(SerializationInfo info, StreamingCont
message = info.GetString("Message");
}

[SecurityCritical]
public override void GetObjectData(SerializationInfo info, StreamingContext context)
{
base.GetObjectData(info, context);
Expand Down
2 changes: 2 additions & 0 deletions Octokit/Exceptions/TwoFactorAuthorizationException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using System.Diagnostics.CodeAnalysis;
using System.Net;
using System.Runtime.Serialization;
using System.Security;

namespace Octokit
{
Expand Down Expand Up @@ -80,6 +81,7 @@ protected TwoFactorAuthorizationException(SerializationInfo info, StreamingConte
TwoFactorType = (TwoFactorType) info.GetInt32("TwoFactorType");
}

[SecurityCritical]
public override void GetObjectData(SerializationInfo info, StreamingContext context)
{
base.GetObjectData(info, context);
Expand Down
3 changes: 2 additions & 1 deletion Octokit/Exceptions/TwoFactorChallengeFailedException.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.Serialization;
using System.Security;

namespace Octokit
{
Expand Down Expand Up @@ -64,7 +65,7 @@ protected TwoFactorChallengeFailedException(SerializationInfo info, StreamingCon
if (info == null) return;
AuthorizationCode = info.GetString("AuthorizationCode");
}

[SecurityCritical]
public override void GetObjectData(SerializationInfo info, StreamingContext context)
{
base.GetObjectData(info, context);
Expand Down
2 changes: 2 additions & 0 deletions Octokit/Http/RateLimit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.Runtime.Serialization;
using System.Security;
using Octokit.Helpers;
using Octokit.Internal;

Expand Down Expand Up @@ -82,6 +83,7 @@ protected RateLimit(SerializationInfo info, StreamingContext context)
ResetAsUtcEpochSeconds = info.GetInt64("ResetAsUtcEpochSeconds");
}

[SecurityCritical]
public virtual void GetObjectData(SerializationInfo info, StreamingContext context)
{
Ensure.ArgumentNotNull(info, "info");
Expand Down