43 Commits
Author SHA1 Message Date
Etienne CHAMPETIER 227b0d1b55 [cleanup] System.Web*: remove TARGET_J2EE
done using unifdef
git grep -l TARGET_J2EE | grep -v ChangeLog | xargs -n1 unifdef -m -UTARGET_J2EE

Signed-off-by: Etienne CHAMPETIER <[email protected]>
2014-12-01 23:57:18 +01:00
Marek Habersack 8af1840778 [asp.net] Added encryption notes to ObjectStateFormatter.{Serialize,Deserialize} 2010-10-27 01:09:13 +02:00
Marek Habersack 8aa83da53e [asp.net] ObjectStateFormatter.{De}serialize methods taking stream use a magic value to mark the stream. 2010-10-21 01:21:53 +02:00
Sebastien Pouliot a22389fde2 Normalization of cryptographic uses in asp.net
* System.Web.Configuration_2.0/MachineKeyRegistryStorage.cs:
Remove key length check and generic key generation.

* System.Web.Configuration_2.0/MachineKeySection.cs: Add support for 4.0
ValidationAlgorithm and the use of custom algorithms (validation and
decryption). Allow the use of any, valid, key length (based on the
algorithm). Let each algorithm creates its own key (e.g. special needs,
default length...)

* System.Web.Configuration_2.0/MachineKeySectionUtils.cs: Remove key
generation (from random) code and 192bits key length hack (won't work
with custom algorithms). Add support for new (4.0) algorithms, including
custom ones. Provide uniform/shared code to Encrypt/Decrypt, Sign/Verify
and EncryptSign/VerifyDecrypt using MachineKeySection data.

* System.Web.Configuration_2.0/MachineKeyValidation.cs: Add new (4.0)
values.

* System.Web.Configuration_2.0/MachineKeyValidationConverter.cs: Add
support for new (4.0) algorithms.

* System.Web.Handlers/AssemblyResourceLoader.cs: Use the new common
cryptographic code and base64 the encrypted data.

* System.Web.Security/FormsAuthentication.cs: Use the new common
cryptographic code and base64 the signed and/or encrypted data.

* System.Web.Security/MembershipHelper.cs: Use the new common
cryptographic code - this should be 100% compatible with existing data.

* System.Web.Security/RolePrincipal.cs: Use the new common cryptographic
code.

* System.Web.Security/SqliteMembershipProvider.cs: Adapt code for
internal API change.

* System.Web.UI/LosFormatter.cs: Adapt code for internal API change.
Fix some small behaviro changes wrt NET_4_0

* System.Web.UI/ObjectStateFormatter.cs: Use the new common cryptographic
code.

* System.Web.UI/Page.cs: Remove code that is now unneeded (with the new
common cryptogrraphic code).

* System.Web.Configuration_2.0/MachineKeyCompatibilityMode.cs: New.

* Test/System.Web.Configuration/MachineKeyValidationConverterTest.cs:
Add more, mostly 4.0, test cases.

* Test/System.Web.Security/FormsAuthenticationTest.cs: Add test case to
ensure HashPasswordForStoringInConfigFile is not case sensitive.

* Test/System.Web.UI/LosFormatterTest.cs: Add some rountrip test cases
with the different ctors
2010-10-12 11:38:47 -04:00
Marek Habersack 5e9719f57c Gotten rid of NET_2_0 ifdefs and 1.1 code from System.Web.UI
svn path=/trunk/mcs/; revision=149929
2010-01-20 21:21:01 +00:00
Marek Habersack 4083fbfc3f 2010-01-20 Marek Habersack <[email protected]>
* ObjectStateFormatter.cs: implemented support for IndexedString
	on top of the existing StringFormatter.

	* IndexedString.cs: implemented

svn path=/trunk/mcs/; revision=149919
2010-01-20 17:48:49 +00:00
Marek Habersack 4e55bac694 2009-12-18 Marek Habersack <[email protected]>
* ObjectStateFormatter.cs: ObjectFormatter.WriteObject checks
	whether candidate converter can convert from string now. Fixes bug
	#565547

2009-12-18  Marek Habersack  <[email protected]>

	* System.Web_test.dll.sources: added
	mainsoft/NunitWeb/NunitWeb/Tests/Author.cs
	mainsoft/NunitWeb/NunitWeb/Tests/AuthorConverter.cs
	mainsoft/NunitWeb/NunitWeb/Tests/Book.cs
	mainsoft/NunitWeb/NunitWeb/Tests/BookType.cs

	* Makefile (TEST_RESOURCE_FILES): added
	Test/mainsoft/NunitWebResources/StateFormatter_CorrectConverter.aspx
	Test/mainsoft/NunitWebResources/StateFormatter_CollectionConverter.aspx
	Test/mainsoft/NunitWebResources/StateFormatter_CollectionConverter.aspx.cs

2009-12-18  Marek Habersack  <[email protected]>

	* ObjectStateFormatterTest.cs: added.

svn path=/trunk/mcs/; revision=148743
2009-12-18 11:07:34 +00:00
Marek Habersack 521f2a3598 2009-10-27 Marek Habersack <[email protected]>
* ObjectStateFormatter.cs: do not use a type converter to
	serialize an object if the converter is an instance of
	TypeConverter itself - its reported capability of converting to
	string is not useful here.

svn path=/trunk/mcs/; revision=144894
2009-10-27 09:55:47 +00:00
Marek Habersack 3a170ffe7d 2009-10-12 Marek Habersack <[email protected]>
* ObjectStateFormatter.cs: if a type is associated with a type
	converter, do not check if the converter can convert FROM the type
	in question, as this is implied. Fixes bug #545979

svn path=/trunk/mcs/; revision=143967
2009-10-12 12:51:30 +00:00
Marek Habersack 5c59801fff Performance improvements:
- made sure invariant culture is used with String.ToLower, String.ToUpper and String.Compare
- replaced all calls to CultureInfo.InvariantCulture with a reference to a static field System.Web.Util.Helpers.InvariantCulture

svn path=/trunk/mcs/; revision=143587
2009-10-07 00:10:03 +00:00
Marek Habersack 9a0870f6a1 Hush compilation warnings
svn path=/trunk/mcs/; revision=135050
2009-05-29 07:48:14 +00:00
Gonzalo Paniagua Javier a547c94668 2009-02-28 Gonzalo Paniagua Javier <[email protected]>
* System.Web/HttpResponseHeader.cs:
	* System.Web/HttpResponse.cs:
	* System.Web/QueueManager.cs:
	* System.Web/HttpRequest.cs:
	* System.Web/TraceManager.cs:
	* System.Web/HttpServerUtility.cs:
	* System.Web/HttpApplication.cs:
	* System.Web.UI/ObjectStateFormatter.cs:
	* System.Web.Security/FormsAuthentication.cs: use GetWebApplication
	instead of GetSection for application level configuration.


svn path=/trunk/mcs/; revision=128270
2009-02-28 18:56:20 +00:00
Igor Zelmanovich 073dc4365f add TARGET_J2EE def
svn path=/trunk/mcs/; revision=102501
2008-05-05 08:08:55 +00:00
Marek Habersack 2db2e001e1 2008-04-18 Marek Habersack <[email protected]>
* ObjectStateFormatter.cs: ObjectFormatter.WriteObject should not
	use a converter if it can't convert _from_ the type of the object
	being written to the stream. Fixes issues with serializing, e.g.,
	a DataSet.

svn path=/trunk/mcs/; revision=101150
2008-04-18 19:33:59 +00:00
Vladimir Krasnov 843ac9cfac * ObjectStateFormatter.cs: revert of 91820
svn path=/trunk/mcs/; revision=95484
2008-02-12 09:24:34 +00:00
Igor Zelmanovich 6c68136cf8 2008-01-30 Igor Zelmanovich <[email protected]>
* ObjectStateFormatter.cs: 
	ensure ReaderContext.GetCache called with positive arg to prevent from
	ArgumentOutOfRange being thrown.


svn path=/trunk/mcs/; revision=94366
2008-01-30 11:12:53 +00:00
Igor Zelmanovich 2400828235 2008-01-29 Igor Zelmanovich <[email protected]>
* ObjectStateFormatter.cs: has public constructor.


svn path=/trunk/mcs/; revision=94257
2008-01-29 16:01:39 +00:00
Igor Zelmanovich e8e4686564 refactoring
svn path=/trunk/mcs/; revision=91820
2007-12-23 08:42:23 +00:00
Marek Habersack 6f82e580a4 2007-11-01 Marek Habersack <[email protected]>
* Page.cs, ObjectStateFormatter.cs: use the new
	MachineKeySectionUtils class wherever necessary.
2007-11-01  Marek Habersack  <[email protected]>

	* System.Web.dll.sources: added MachineKeySectionUtils.cs
2007-11-01  Marek Habersack  <[email protected]>

	* RolePrincipal.cs, MembershipProvider.cs: use the new
	MachineKeySectionUtils class wherever necessary.

	* FormsAuthentication.cs: use the new MachineKeySectionUtils class
	wherever necessary.
	GetHexString is a private method again.
2007-11-01  Marek Habersack  <[email protected]>

	* MachineKeySection.cs: moved all the internal static methods and
	properties to MachineKeySectionUtils.cs

	* MachineKeySectionUtils.cs: added. This file is included in the
	System.Web.Extensions compilation.
	The old properties from MachineKeySection.cs became methods.
2007-11-01  Marek Habersack  <[email protected]>

	* AssemblyResourceLoader.cs: added GetHexString, copied from
	FormsAuthentication.cs. Encryption/decryption routines use methods
	from the new MachineKeySectionUtils class. This is needed for the
	same code to work from both System.Web and System.Web.Extensions.


svn path=/trunk/mcs/; revision=88621
2007-11-01 02:14:52 +00:00
Marek Habersack 008a69040e formatting
svn path=/trunk/mcs/; revision=86117
2007-09-20 22:59:03 +00:00
Vladimir Krasnov aac94353f2 * ObjectStateFormatter.cs: optimized loops in array formatters
svn path=/trunk/mcs/; revision=81699
2007-07-10 12:15:37 +00:00
Vladimir Krasnov 37e14dc36c * ObjectStateFormatter.cs: WriterContext.RegisterCache, refactored out parameter
svn path=/trunk/mcs/; revision=80617
2007-06-24 09:24:25 +00:00
Gert Driesen 1671cb3249 * ObjectStateFormatter.cs: Avoid NRE in Serialize. Fixes bug #81851.
* LosFormatterTest.cs: Added tests for LosFormatter.
* System.Web_test.dll.sources: Added LosFormatterTest.cs.

svn path=/trunk/mcs/; revision=79754
2007-06-15 20:11:35 +00:00
Adar Wesley 4b91e3e87b 2007-03-06 Adar Wesley <[email protected]>
* Page.cs: initial implementation of support for Async=true.  Added
        initial support for ViewStateEncryption.  Implemented
        CreateHtmlTextWriterFromType.

        * PageAsyncTask.cs: Created class to support Async pages.

        * ObjectStateFormatter.cs: Added support for ViewState encryption.

        * HtmlTextWriter.cs: Fixed constructor to accept null TextWriter
        to conform to MS behavior.


svn path=/trunk/mcs/; revision=73797
2007-03-06 10:00:18 +00:00
Igor Zelmanovich 3168c4a908 2007-02-20 Igor Zelmanovich <[email protected]>
* ObjectStateFormatter.cs:
	optimization for serialization of primitive type arrays	

svn path=/trunk/mcs/; revision=73152
2007-02-20 10:04:33 +00:00
Marek Habersack 78c82d7d42 Implement the 2.0 page state persister model, and use it internally int the 1.x profile
svn path=/trunk/mcs/; revision=69254
2006-12-09 00:03:31 +00:00
Gonzalo Paniagua Javier 654d38765c 2006-11-16 Gonzalo Paniagua Javier <[email protected]>
* LosFormatter.cs:
	* ObjectStateFormatter.cs: match MS 1.x and 2.0 behaviour for null and
	empty strings.


svn path=/trunk/mcs/; revision=68034
2006-11-16 20:49:11 +00:00
Gonzalo Paniagua Javier 6be4ffb621 2006-02-10 Gonzalo Paniagua Javier <[email protected]>
* System.Web.Configuration_2.0/Compiler.cs:
	* System.Web.Configuration_2.0/CompilerCollection.cs: removed
	compatibility code.

	* System.Web.Configuration_2.0/BuildProviderCollection.cs: add
	GetProviderForExtension().

	* System.Web.UI/IThemeResolutionService.cs: this is now added to the
	sources file, but some other stuff does not compile yet as the
	interface changed after the beta.

	* System.Web.UI/ObjectConverter.cs: removed extra attribute.

	* System.Web.UI/ObjectStateFormatter.cs: add IStateFormatter for 2.0.

	* System.Web.UI/ICallbackEventHandler.cs: update the interface, but
	commented the 'good' stuff out, since other files need to be fixed
	too.

	* System.Web.dll.sources: add new files.

	* System.Web.Configuration/CompilationConfiguration.cs:
	* System.Web.Configuration/CompilationConfigurationHandler.cs: only
	compile these for pre-2.0 assemblies.

	* System.Web.Hosting/DefaultVirtualPathProvider.cs: add some
	comments/TODO.
	* System.Web.Hosting/HostingEnvironment.cs: initialize the
	default value for VirtualPathProvider.

	* System.Web.Compilation/CompilerType.cs: implemented.

	* System.Web.Compilation/AssemblyBuilder.cs: implemented most of it.

	* System.Web.Compilation/WebServiceCompiler.cs:
	* System.Web.Compilation/CachingCompiler.cs: update 2.0 compiler
	instance creation code.

	* System.Web.Compilation/ClientBuildManager.cs: implemented some of
	its methods. Not yet ready.

	* System.Web.Compilation/BuildManager.cs: the more interesting methods
	are implemented now.

	* System.Web.Compilation/BaseCompiler.cs: delete the temporary files
	in case of error.

	* System.Web.Compilation/BuildProvider.cs: implemented the
	Get*Compiler* protected methods.


svn path=/trunk/mcs/; revision=56781
2006-02-10 23:43:09 +00:00
Konstantin Triger e339aeb86e refactoring for ColorFormatter Read/Write
svn path=/trunk/mcs/; revision=56033
2006-01-25 08:32:05 +00:00
Konstantin Triger caee16f7d1 preserve emptiness in ColorFormatter
svn path=/trunk/mcs/; revision=55711
2006-01-18 08:57:28 +00:00
Vladimir Krasnov 76313ccac3 * ObjectStateFormatter.cs: Removed TARGET_JVM parts in
TypeFormatter.Read

svn path=/trunk/mcs/; revision=55375
2006-01-11 15:46:36 +00:00
Vladimir Krasnov 20ac4bb294 * ObjectStateFormatter.cs: Merged TARGET_JVM parts in
TypeFormatter.Read, TypeFormatter.Write from /main/5

svn path=/trunk/mcs/; revision=55246
2006-01-09 17:34:33 +00:00
Duncan Mak d1c09fcc67 Add licensing info
svn path=/trunk/mcs/; revision=30345
2004-06-24 20:59:43 +00:00
Gonzalo Paniagua Javier aaabec71e5 2004-06-03 Gonzalo Paniagua Javier <[email protected]>
* ObjectStateFormatter.cs: use ObjectFormatter methods instead of
	calling a protected method of another object.

svn path=/trunk/mcs/; revision=28737
2004-06-03 04:57:26 +00:00
Atsushi Eno b03dd37b8f 2004-06-03 Atsushi Enomoto <[email protected]>
* ObjectStateFormatter.cs : csc build fix. Protected Read()/Write()
	  (of other objects) are called in TypeConverterFormatter.

svn path=/trunk/mcs/; revision=28735
2004-06-03 04:35:12 +00:00
Gonzalo Paniagua Javier 554f9ec5ca 2004-06-03 Gonzalo Paniagua Javier <[email protected]>
* ObjectStateFormatter.cs: before choosing the binary formatter, check
	if the object type has a TypeConverter that can convert to/from string.
	Fixes bug #59495.

	* Page.cs: call GetViewStateString from outside the WriteLine. This
	allows writing to the Response when getting the string without breaking
	the HTML generated.

svn path=/trunk/mcs/; revision=28721
2004-06-03 00:05:29 +00:00
Martin Baulig dfedf08d98 2004-04-22 Martin Baulig <[email protected]>
Renamed the `NET_1_2' conditional to `NET_2_0' in all files.

svn path=/trunk/mcs/; revision=25877
2004-04-23 02:24:02 +00:00
Gonzalo Paniagua Javier 8a88b9bd57 typo
svn path=/trunk/mcs/; revision=21247
2003-12-16 17:41:03 +00:00
Gonzalo Paniagua Javier e4299678de 2003-12-16 Gonzalo Paniagua Javier <[email protected]>
* ObjectStateFormatter.cs: added formatters for Unit and FontUnit, which
	are not [Serializable]. Fixes bug #52244.

svn path=/trunk/mcs/; revision=21246
2003-12-16 17:36:10 +00:00
Ben Maurer 8420bd11b0 2003-11-30 Ben Maurer <[email protected]>
* LosFormatter.cs: Use ObjectStateFormatter. Pretty big size
	reduction.

	* ObjectStateFormatter.cs: Comment out tracing.

svn path=/trunk/mcs/; revision=20647
2003-12-01 01:07:45 +00:00
Gonzalo Paniagua Javier 6162bd2ef5 fix build on windows.
svn path=/trunk/mcs/; revision=20381
2003-11-24 13:14:56 +00:00
Ben Maurer ad8bbec4ba 2003-11-22 Ben Maurer <[email protected]>
* ObjectStateFormatter.cs: Fix bug when reading small ints.
	Add some tracing so we can see what is going on.

svn path=/trunk/mcs/; revision=20343
2003-11-22 22:04:38 +00:00
Ben Maurer 46a2f42592 2003-11-21 Ben Maurer <[email protected]>
* ObjectStateFormatter.cs: v2 file. In v1.x this will be
	internal as LosFormatter will eventually use it to save
	the view state.

svn path=/trunk/mcs/; revision=20329
2003-11-22 04:31:31 +00:00