69 Commits
Author SHA1 Message Date
Marek Safar 12b712c891 Merge pull request #896 from echampet/webresource
[Fix] ReusableHashAlgorithm doesn't set the Key of the ValidationAlgorit...
2016-03-29 09:33:39 +02:00
Alexander Köplinger b03e606287 Remove ChangeLog files from the repo
They weren't updated in the last 6 years and aren't helpful anymore (e.g. by causing unrelated matches during git grep searches).
2016-01-29 19:17:06 +01:00
Alexander Köplinger 2a978a42f1 [bcl] Remove NET_3_5 defines from class libs 2015-01-21 17:59:27 +01:00
Zoltan Varga 0985d4aa4b [bcl] Remove NET_2_0 defines from the class libs. This has been done using: unifdef -t -DNET_2_0 -o <filename> <filename>. 2015-01-13 15:29:38 -05:00
Alexander Köplinger 48e112d652 [Cleanup] Removed TARGET_JVM
It was once part of a special Java target profile, but this is no longer used today.
2014-08-08 03:28:34 +02:00
Etienne CHAMPETIER 8fdf3ae11c [Fix] ReusableHashAlgorithm doesn't set the Key of the ValidationAlgorithm
Without this patch you can't use "WebResource.axd" ressources
in a cluster (each mono instance will get a different link for the same ressource)

Signed-off-by: Etienne CHAMPETIER <[email protected]>
2014-04-01 11:42:09 +02:00
QuickJack ef6752a5c4 Fixes a number of warnings in System.Web.dll 2012-07-03 20:38:53 +02:00
Gonzalo Paniagua Javier dc75067d8d Fix issues with caching
When the 't' parameter was specified, we returned a 304 if the
	timestamp matched the assembly timestamp, even if the client
	needed the entire body. We were also setting the 304 response
	cachebility as public to further mess things up.

	Fixes the treeview in the class status pages.
2012-04-14 15:27:41 -04:00
Gonzalo Paniagua Javier f3013421d0 Don't 404 when any of the hashes has a / in it
This fixes "random" problems getting resources served by
	WebResource.axd.
2011-10-16 00:12:46 -04:00
Marek Safar 445db047a0 Assign uninitialized out parameter 2011-09-07 16:38:43 +01:00
Marek Habersack 37a3e41b87 [asp.net] Implemented composite scripts support in System.Web.Extensions 2011-04-21 02:24:40 +02:00
Marek Habersack 4421a52c48 Fix for bug #659064. Resource URLs must always be the same. UpdatePanel triggers must always be initialized.
String hash cache must not be thread-local. Hashes computed for a string once must be shared by
all the threads or different URLs may be generated for the same assembly+resource pair.
UpdatePanel triggers must be initialized not only during the Load event but also when they are
inserted after that point.
2011-01-10 22:19:12 +01:00
Marek Habersack 2f5f1984ec [asp.net] Don't instantiate the hash algorithm used to encrypt resource URLs on each request if it can be reused.
The algorithm instance is kept in a thread-local variable.
2010-11-09 02:15:11 +01:00
Marek Habersack 1ed35b4740 [asp.net] Optimize memory usage a bit. String hashes are cached in thread-local storage. 2010-11-08 15:42:14 +01:00
Marek Habersack a9cb57cc13 [asp.net] Part of fix for bug #649546. A partial rewrite of the web/script resource handler.
* System.Web/System.Web.Handlers/AssemblyResourceLoader.cs: AssemblyResourceLoader/ScriptResourceHandler must
  always generate the same URL for every assembly+resource pair, or otherwise the browser would re-fetch
  the resource in situations where it is not desired (e.g. during an async request to the server to update
  a panel).
  The generated URLs are not encrypted using real encryption, just hashed.
  In addition, the handler code got modernized a bit.

* System.Web.Extensions/System.Web.UI/ScriptManager.cs: scriptStartupBlock is a 3.5+ thing

* System.Web.Extensions_1.0/Makefile: use the 1.0 Microsoft AJAX library for this compat assembly

* System.Web/System.Web.Util/MachineKeySectionUtils.cs: made GetValidationKey public
2010-11-03 03:21:02 +01:00
Marek Habersack 2a6bc369a3 [asp.net] make sure the string we pass to DecryptAssemblyResource is a valid Base64 string 2010-10-18 23:17:12 +02:00
Sebastien Pouliot 21d2c6aedb A few moves/changes following previous patch review
* Makefile: Compile tests with TEST defined (to include System.Web.Util.
MachineKeySectionUtils unit tests)
* System.Web.dll.sources: Move MachineKeySectionUtils.cs from System.
Web.Configuration_2.0 to System.Web.Util
* System.Web_test.dll.sources: Move MachineKeySectionUtilsTest.cs from
System.Web.Configuration_2.0 to System.Web.Util

* System.Web.Configuration_2.0/MachineKeySection.cs: Adjust using
clauses. Uncomment some code. Fix TripleDES versus 3DES for Validation
under NET_4_0. Remove 'private' on fields/methods.
* System.Web.Handlers/AssemblyResourceLoader.cs: Adjust using clauses
* System.Web.Security/MembershipHelper.cs: Adjust using clauses
* System.Web.Security/RolePrincipal.cs: Adjust using clauses
* System.Web.SessionState_2.0/SessionId.cs: Adjust using clauses
* System.Web.UI/LosFormatter.cs: Adjust using clauses.
* System.Web.Util/MachineKeySectionUtils.cs: Moved from System.Web.
Configuration_2.0. Rename namespace and remove 'internal' on type
declaration

* Test/System.Web.Util/MachineKeySectionUtilsTest.cs: Moved from Test/
System.Web.Configuration/MachineKeySectionTest.cs. Add test case for
TripleDES versus 3DES
2010-10-12 11:38:48 -04: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 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
Gonzalo Paniagua Javier e35c0b2928 2009-07-08 Gonzalo Paniagua Javier <[email protected]>
* AssemblyResourceLoader.cs: send minimal headers set and don't call
	response.End.  When possible, write the resource using the unsafe
	methods in HttpResponseStream.a


svn path=/trunk/mcs/; revision=137576
2009-07-08 17:36:00 +00:00
Gonzalo Paniagua Javier 69a764bab3 fix the 1.1 build
svn path=/trunk/mcs/; revision=131056
2009-04-04 20:30:28 +00:00
Gonzalo Paniagua Javier 6ab8340897 2009-04-04 Gonzalo Paniagua Javier <[email protected]>
* AssemblyResourceLoader.cs: MS sets cacheability to public. Add
	Last-Modified header and return 304 if validating max-age=0 or
	If-Modified-Since succeeds.


svn path=/trunk/mcs/; revision=131053
2009-04-04 19:53:26 +00:00
Marek Habersack ef9c9e51ce Do not abuse the 'private' keyword
svn path=/trunk/mcs/; revision=116539
2008-10-20 17:37:54 +00:00
Marek Habersack a366e3b759 2008-05-15 Marek Habersack <[email protected]>
* AspComponentFoundry.cs: treat AssemblyFoundry in a special way
	when adding a foundry to the array list. AssemblyFoundry instances
	are stacked at the end of the array list in a LIFO manner. That
	way TagNameFoundry takes precedence over AssemblyFoundry should
	the two contain the same type.

2008-05-14  Marek Habersack  <[email protected]>

	* AssemblyResourceLoader.cs: do not add the same entry to a
	hashtable twice



svn path=/trunk/mcs/; revision=103243
2008-05-15 01:32:36 +00:00
Marek Habersack 58a3b00cd8 2008-04-15 Marek Habersack <[email protected]>
* AssemblyResourceLoader.cs: dispose of streams the way it should
        be done.

2008-04-15  Marek Habersack  <[email protected]>

        * MailDefinition.cs: dispose of streams the way it should
        be done.

2008-04-15  Marek Habersack  <[email protected]>

        * HttpRequest.cs: dispose of streams the way it should
        be done.

2008-04-15  Marek Habersack  <[email protected]>

        * CachingCompiler.cs: dispose of streams the way it should
        be done.


svn path=/trunk/mcs/; revision=100690
2008-04-14 22:45:44 +00:00
Igor Zelmanovich e9dcda62c3 merge r97285
svn path=/trunk/mcs/; revision=97287
2008-03-04 11:40:45 +00:00
Marek Habersack 3476c409c3 2007-12-13 Marek Habersack <[email protected]>
* ClientScriptManager.cs, MasterPageParser.cs, Control.cs,
	Page.cs: speed optimization - use String.Concat instead of
	String.Format in some cases.
2007-12-13  Marek Habersack  <[email protected]>

	* Menu.cs, TreeView.cs: optimize use of String.Format in
	OnPreRender.
	Speed optimization - use String.Concat instead of String.Format in
	some cases.

	* GridView.cs, DetailsView.cs: optimize use of String.Format in
	OnPreRender.

	* CheckBox.cs, AccessDataSource.cs, WebColorConverter.cs,
	WebControl.cs,TextBox.cs, DropDownList.cs, ValidationSummary.cs,
	ListBox.cs, Panel.cs, BaseValidator.cs, LinkButton.cs: speed
	optimization - use String.Concat instead of String.Format in some cases.
2007-12-13  Marek Habersack  <[email protected]>

	* HtmlForm.cs, HtmlButton.cs: speed optimization - use String.Concat
	instead of String.Format in some cases.
2007-12-13  Marek Habersack  <[email protected]>

	* AssemblyResourceLoader.cs: speed optimization - use String.Concat
	instead of String.Format in some cases.
2007-12-13  Marek Habersack  <[email protected]>

	* SessionId.cs: 
	speed optimization - use String.Concat
	instead of String.Format in some cases.
2007-12-13  Marek Habersack  <[email protected]>

	* SqlProfileProvider.cs, ProfileParser.cs: speed optimization -
	use String.Concat instead of String.Format in some cases.
2007-12-13  Marek Habersack  <[email protected]>

	* ApplicationManager.cs, ApplicationHost.cs,
	DefaultVirtualPathProvider.cs: speed optimization - use
	String.Concat instead of String.Format in some cases.

svn path=/trunk/mcs/; revision=91230
2007-12-13 13:50:10 +00:00
Igor Zelmanovich 4564cfa88c 2007-11-12 Igor Zelmanovich <[email protected]>
* AssemblyResourceLoader.cs:
	according to the tests, GetResourseUrl never returns null.	


svn path=/trunk/mcs/; revision=89464
2007-11-12 14:45:12 +00:00
Igor Zelmanovich 6f578af9ff 2007-11-12 Igor Zelmanovich <[email protected]>
* AssemblyResourceLoader.cs:
	optimize performance of WebResource/ScriptResource feature.
	All resource urls are cached for each assembly instead to be 
	calculated each time when GetWebResourceUrl is called


svn path=/trunk/mcs/; revision=89458
2007-11-12 12:21:22 +00:00
Igor Zelmanovich 5c1b476aec 2007-11-06 Igor Zelmanovich <[email protected]>
* AssemblyResourceLoader.cs:
	makes it works for System.Web.Extensions.	


svn path=/trunk/mcs/; revision=88987
2007-11-06 15:37:12 +00:00
Juraj Skripsky d0ffd20aaa 2007-11-02 Juraj Skripsky <[email protected]>
* AssemblyResourceLoader.cs: As the assembly name is encrypted via
	EncryptAssemblyResource, we mustn't UrlEncode it anymore.


svn path=/trunk/mcs/; revision=88713
2007-11-02 09:46:36 +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 09d8ee3a3c 2007-10-31 Marek Habersack <[email protected]>
* FormsAuthentication.cs: made GetHexString an internal method -
	it is used in the AssemblyResourceLoader.cs
2007-10-31  Marek Habersack  <[email protected]>

	* AssemblyResourceLoader.cs: implemented assembly+resource name
	encryption in the URLs. This follows MS.NET behavior. Also the
	code is not varying the cache on the 't' parameter. Fixes bug
	#338051.

svn path=/trunk/mcs/; revision=88608
2007-10-31 21:47:27 +00:00
Juraj Skripsky b92b0ea222 2007-10-30 Juraj Skripsky <[email protected]>
* AssemblyResourceLoader.cs: Always use '&' as query parameter
	separator, as HttpUtility does not support ';' anymore.


svn path=/trunk/mcs/; revision=88454
2007-10-30 13:10:44 +00:00
Igor Zelmanovich 43697d3e4c 2007-08-23 Igor Zelmanovich <[email protected]>
* AssemblyResourceLoader.cs: for SYSTEM_WEB_EXTENSIONS only:
	fixed JSON serialization of resources.


svn path=/trunk/mcs/; revision=84685
2007-08-23 10:44:10 +00:00
Rodrigo Kumpera 685ad1f3e2 2007-08-06 Rodrigo Kumpera <[email protected]>
* AssemblyResourceLoader.cs: use the right static constructor name
	if SYSTEM_WEB_EXTENSIONS is defined.


svn path=/trunk/mcs/; revision=83540
2007-08-06 15:20:49 +00:00
Vladimir Krasnov 2b44f3485e * AssemblyResourceLoader.cs: performance optimization, caching urls for built-in resources
fixed CacheControl, should be private
added HttpException if resource is not found

svn path=/trunk/mcs/; revision=83532
2007-08-06 13:48:36 +00:00
Igor Zelmanovich 1e2a73bdf5 2007-07-16 Igor Zelmanovich <[email protected]>
* AssemblyResourceLoader.cs:
	fixed RegEx used for PerformSubstitution feature.


svn path=/trunk/mcs/; revision=82023
2007-07-16 10:24:19 +00:00
Igor Zelmanovich c182f522de 2007-07-11 Igor Zelmanovich <[email protected]>
* AssemblyResourceLoader.cs:
	for System.Web.Extensions only:
	ScriptResourceName may include ".resource" suffix.


svn path=/trunk/mcs/; revision=81784
2007-07-11 11:17:21 +00:00
Igor Zelmanovich eed675e11f 2007-07-03 Igor Zelmanovich <[email protected]>
* AssemblyResourceLoader.cs:
	implemented WebResourceAttribute.PerformSubstitution feature.


svn path=/trunk/mcs/; revision=81273
2007-07-03 16:04:32 +00:00
Vladimir Krasnov 8f28cf0c9a * AssemblyResourceLoader.cs: GetResourceUrl, fixed typo
svn path=/trunk/mcs/; revision=80314
2007-06-20 12:40:45 +00:00
Igor Zelmanovich ec1fa6f202 implemented ScriptResource and NotifyScriptLoaded features
svn path=/trunk/mcs/; revision=80123
2007-06-19 10:53:07 +00:00
Igor Zelmanovich 5eb4f1798b 2007-06-18 Igor Zelmanovich <[email protected]>
* AssemblyResourceLoader.cs: refactoring:
	make the code reusable in System.Web.Extensions.	

2007-06-18 Igor Zelmanovich <[email protected]>

	* HttpUtility.cs: refactoring:
	removed constants to another class.	


svn path=/trunk/mcs/; revision=79979
2007-06-18 08:08:58 +00:00
Vladimir Krasnov a9a8e58bfd * AssemblyResourceLoader.cs: GetResourceUrl, TARGET_JVM will use type's hashcode for resource url
svn path=/trunk/mcs/; revision=78176
2007-05-30 08:58:25 +00:00
Konstantin Triger 898724f159 refactoring: fix documentation attributes
svn path=/trunk/mcs/; revision=78129
2007-05-29 14:57:08 +00:00
Marek Habersack 2cdf3d39be 2007-04-06 Marek Habersack <[email protected]>
* ClientScriptManager.cs: render the 'type' attribute in
	WriteScript and do not render the 'language' attribute when in
	NET_2_0+ mode.

2007-04-06  Marek Habersack  <[email protected]>

	* HttpUtility.cs: added a constant that contains the default query
	parameter character.
	ParseQueryString supports queries with both '&' and ';' parameter
	separators.

2007-04-06  Marek Habersack  <[email protected]>

	* HtmlForm.cs: render the 'name' attribute only when in non-xhtml
	compliant mode.

2007-04-06  Marek Habersack  <[email protected]>

	* AssemblyResourceLoader.cs: use the correct query parameter
	separator char for the current platform version. Fixes bug
	#80633.

svn path=/trunk/mcs/; revision=75480
2007-04-06 11:51:51 +00:00
Miguel de Icaza 8616a7e405 2006-11-28 Miguel de Icaza <[email protected]>
* Rationalize the user of MonoTODOs.  

		- Removed all the TODOs that were only overwritten methods
		and had no further information.

		- Methods that threw exceptions now have the message "Not
		implemnted".

		- Methods that return some constant are declared like
		that.

		- Removed a bunch of stale MonoTODOs that had not been
		removed. 


svn path=/trunk/mcs/; revision=68620
2006-11-28 22:15:23 +00:00
Igor Zelmanovich d2663dc867 2006-11-02 Igor Zelmanovich <[email protected]>
* ClientScriptManager.cs: 
	fixed: checks arguments for null in public methods,
	fixed public interface.


svn path=/trunk/mcs/; revision=67267
2006-11-02 14:06:43 +00:00
Miguel de Icaza 201ee3a1c5 Inspired by a patch from Alexander Concha, do not crash if we do not find the resource
svn path=/trunk/mcs/; revision=62719
2006-07-18 18:04:01 +00:00
Gonzalo Paniagua Javier 4873356045 2006-01-30 Gonzalo Paniagua Javier <[email protected]>
* TraceHandler.cs: class status fixes.


svn path=/trunk/mcs/; revision=56292
2006-01-30 22:07:10 +00:00