Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
P
protobuf
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
protobuf
Commits
39182753
Commit
39182753
authored
Sep 09, 2014
by
Jon Skeet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add SecurityCritical attributes to serialization, and add the AllowPartiallyTrustedCallers
attribute. This fixes issue 91.
parent
92d6214e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
CustomSerialization.cs
src/ProtocolBuffers/CustomSerialization.cs
+5
-1
AssemblyInfo.cs
src/ProtocolBuffers/Properties/AssemblyInfo.cs
+3
-0
No files found.
src/ProtocolBuffers/CustomSerialization.cs
View file @
39182753
...
...
@@ -37,9 +37,9 @@
* This entire source file is not supported on some platform
*/
#if !NOSERIALIZABLE
using
System
;
using
System.Runtime.Serialization
;
using
System.Security
;
namespace
Google.ProtocolBuffers
{
...
...
@@ -51,6 +51,7 @@ namespace Google.ProtocolBuffers
[
Serializable
]
partial
class
AbstractMessageLite
<
TMessage
,
TBuilder
>
:
ISerializable
{
[
SecurityCritical
]
void
ISerializable
.
GetObjectData
(
SerializationInfo
info
,
StreamingContext
context
)
{
info
.
SetType
(
typeof
(
SerializationSurrogate
));
...
...
@@ -93,6 +94,7 @@ namespace Google.ProtocolBuffers
return
message
;
}
[
SecurityCritical
]
void
ISerializable
.
GetObjectData
(
SerializationInfo
info
,
StreamingContext
context
)
{
info
.
AddValue
(
"message"
,
_message
);
...
...
@@ -103,6 +105,7 @@ namespace Google.ProtocolBuffers
[
Serializable
]
partial
class
AbstractBuilderLite
<
TMessage
,
TBuilder
>
:
ISerializable
{
[
SecurityCritical
]
void
ISerializable
.
GetObjectData
(
SerializationInfo
info
,
StreamingContext
context
)
{
info
.
SetType
(
typeof
(
SerializationSurrogate
));
...
...
@@ -135,6 +138,7 @@ namespace Google.ProtocolBuffers
return
builder
;
}
[
SecurityCritical
]
void
ISerializable
.
GetObjectData
(
SerializationInfo
info
,
StreamingContext
context
)
{
info
.
AddValue
(
"message"
,
_message
);
...
...
src/ProtocolBuffers/Properties/AssemblyInfo.cs
View file @
39182753
...
...
@@ -37,6 +37,7 @@ using System.Runtime.CompilerServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
using
System.Security
;
[assembly: AssemblyTitle("ProtocolBuffers")]
[assembly: AssemblyDescription("")]
...
...
@@ -65,3 +66,4 @@ using System.Runtime.CompilerServices;
#endif
[assembly: CLSCompliant(true)]
[assembly: AllowPartiallyTrustedCallers]
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment