Commit Graph

6030 Commits

Author SHA1 Message Date
Sebastiaan Janssen
83f08538c2 U4-10407 We should log unhandled exceptions that occur in webapi controllers and always have detailed errors returned to users even when not in debug mode
# Conflicts:
#	src/Umbraco.Web/WebApi/UmbracoAuthorizedApiController.cs
2017-09-13 12:05:02 +02:00
Shannon Deminick
41eeb38c5f Merge pull request #2043 from umbraco/TEMP-u4-10135
Added TruncateByWords method + overloads
2017-09-12 13:36:00 +10:00
Shannon Deminick
ba072aec7c Merge pull request #2183 from umbraco/temp-U4-10400
U4-10400 Clear CDF temp files during upgrades
2017-09-12 13:26:41 +10:00
Sebastiaan Janssen
c55cf75ada Use HttpContext from the controller 2017-09-11 13:30:06 +02:00
Sebastiaan Janssen
23950c0cac U4-10400 Clear CDF temp files during upgrades 2017-09-11 12:22:38 +02:00
Sebastiaan Janssen
3423d8b2cc Merge branch 'dev-v7' into temp-u4-10006
# Conflicts:
#	.gitignore
#	build/Build.bat
#	build/Build.proj
#	build/BuildBelle.bat
#	build/UmbracoVersion.txt
#	src/Umbraco.Web.UI/Umbraco.Web.UI.csproj
2017-09-09 14:54:48 +02:00
Claus
6e348a3a1a Merge branch 'HarveyWilliams-patch-4' into dev-v7 2017-09-08 13:59:35 +02:00
Claus
733c920867 using string.replace instead of regex.
adding unit test.
2017-09-08 13:57:28 +02:00
Claus
22bd6cd989 U4-10392 Culture and hostnames with special characters can register as collisions 2017-09-08 11:25:41 +02:00
Shannon
0713f12ba6 makes new classes internal 2017-09-08 12:02:20 +10:00
Stephan
d6f8b878d2 perfs - cleanup 2017-09-07 13:45:56 +02:00
Claus
60f7211a80 Merge branch 'patch-4' of git://github.com/HarveyWilliams/Umbraco-CMS into HarveyWilliams-patch-4 2017-09-07 10:36:49 +02:00
Stephan
dbda6689b6 perfs - suspendable 2017-09-06 18:50:54 +02:00
Robert
18d0fec014 Added some trimming and test to StripHtmlTags 2017-09-06 12:03:15 +02:00
Robert
b1358936b4 Cleaning up tests and useless TruncateByWords functions 2017-09-06 11:17:06 +02:00
Robert
b2798e38f7 Replaced html stripping with already existing function, removing unused code 2017-09-06 11:12:14 +02:00
Shannon
a603fd0c46 Merge branch 'TEMP-u4-10135' of https://github.com/umbraco/Umbraco-CMS into TEMP-u4-10135
# Conflicts:
#	src/Umbraco.Web/HtmlStringUtilities.cs
2017-09-06 10:05:00 +10:00
Shannon
4b5c49907c switches to constant - comments out what seems to be a totally unused variable 2017-09-06 10:01:39 +10:00
Sebastiaan Janssen
44102df36f Merge pull request #2167 from umbraco/temp-U4-10370
U4-10370 Culture and hostnames with "æøå" after /
2017-09-04 11:25:55 +02:00
Robert
972d5f8296 Reverted back to last commit, invalid html check added 2017-09-03 21:17:53 +02:00
Sebastiaan Janssen
617a91c57e Merge pull request #2119 from umbraco/temp-U4-10274
U4-10274 Umbraco.MemberHasAccess isn't cached
2017-09-01 15:45:55 +02:00
Sebastiaan Janssen
cb0e5414b9 Merge pull request #2155 from umbraco/temp-U4-10361
U4-10361 Creating new member when `AllowManuallyChangingPassword="fal…
2017-09-01 14:46:58 +02:00
Claus
22cef52261 removing using. 2017-09-01 13:50:51 +02:00
Claus
41e419a49e U4-10370 Culture and hostnames with "æøå" after / 2017-09-01 13:48:39 +02:00
Stephan
5ba801386c Merge branch 'dev-v7' into temp-deploy-358 2017-08-31 18:03:19 +02:00
Robert
73937172dc Added check for invalid HTML and sanitization on said HTML
Added HtmlSanitization package
Added check for invalid HTML and sanitization on WordsToLength and Truncate methods
Addes some extra comments
2017-08-31 11:43:06 +02:00
Robert
8c1996a7a1 Changed from the String object qualifier to type qualifier 2017-08-31 09:15:02 +02:00
Robert
039ab8f1d2 Null check for firstTrim added and fixed typo 2017-08-30 09:18:45 +02:00
Shannon
8c998fd4e6 Creates a virtual ConfigureUmbracoUserManager in UmbracoDefaultOwinStartup so inheritors can just override that if they want to simplify the startup owin code process 2017-08-30 11:02:58 +10:00
Sebastiaan Janssen
d300bf8d6d U4-10367 417 missing token error due to cookie being overwritten
Changes the cookie and header names to be Umbraco specific
2017-08-29 11:17:52 +02:00
Shannon
13e2112c3c U4-10361 Creating new member when AllowManuallyChangingPassword="false" - can't set a password 2017-08-29 11:56:38 +10:00
Shannon
ca00246236 another update to perform a little better again (cookies are read VERY often) 2017-08-29 11:10:28 +10:00
Shannon
d71b8a139f Moves GetCookieValue to an extension method, cleans up code, adds unit tests 2017-08-29 10:50:20 +10:00
Sebastiaan Janssen
6bf0d6e175 U4-10363 417 missing token error due to invalid cookie name
Manually parse the cookie header instead of using the buggy extension method
2017-08-28 20:36:56 +02:00
Robert
68fd74897f Replaced the Regex parse with HtmlAgilityPack parser 2017-08-28 10:52:53 +02:00
Robert
047a41c05e Having a space in a tag is now taken as a char length and not as a space between words 2017-08-28 10:14:16 +02:00
Sebastiaan Janssen
9917fb20ca U4-10356 Update default Config/Lang after each update
Also makes sure UserExtensions returns the correct language
2017-08-25 16:13:04 +02:00
Robert
84f684ed31 Truncate with trimming should now work, added some mpore tests for truncate by words methods
Fix: Original Truncate method show now be able to trim
Add: Added some more tests for Truncate by words to cater for tagsAsContent parameter
Fix: In original truncate, currentTextLength prop will be increased everytime a tag is added, this will fix an issue when tagsAsContent is set to true (it would have added an extra char per tag, which would have went over to the next word)
2017-08-25 11:39:13 +02:00
Shannon
e71e9d7efb U4-10249 FolderAndFilePermissions HealthCheck causes the application to restart
(cherry picked from commit bdb991f6dc)
2017-08-24 18:51:53 +02:00
Shannon
93cd03da28 minor code cleanup 2017-08-24 18:38:40 +10:00
Shannon
085c06e043 Adds EventState to the event args instead of trying to change the AdditionalData which is a breaking change. Updates FileService and ContentService to use one event arg insteance for both before/after events so that the EventState flows and so we are allocating less objects. 2017-08-24 16:22:50 +10:00
Robert
54f86c06f0 Fix TruncateByWords to work with tags 2017-08-21 12:30:16 +02:00
Harvey Williams
13f76d2af9 Updated ReplaceLineBreaksForHtml to include \r
I was surprised when this method did not replace a `\r` character with an HTML break. I have updated it to not only replace `\n`, but also `\r\n` and just `\r`.

I think these cases should be considered because of [this SO thread](https://stackoverflow.com/questions/4824621/is-a-new-line-n-or-r-n).

The updated code will not replace `\n\r` with one break but with two.

I used [this SO answer](https://stackoverflow.com/a/8196219/2963111) to update the method.

```
[TestMethod]
public void ReplaceLineBreaksForHtmlTest()
{
    var result = "foo\rbar\nbaz\r\nbiff\n\r".ReplaceLineBreaksForHtml();

    Assert.AreEqual(result, "foo<br />\rbar<br />\nbaz<br />\r\nbiff<br />\n<br />\r");
}
```
2017-08-11 11:42:35 +01:00
Shannon
0e273d1a08 U4-7382 Text Properties Containing JSON Are Corrupted on Publish 2017-08-11 15:11:53 +10:00
Shannon
d8cfd8f12e U4-10274 Umbraco.MemberHasAccess isn't cached 2017-08-10 13:46:18 +10:00
Shannon
1ccc8cc161 U4-10123 Make sure the backoffice login is not susceptible to DOS attacks 2017-07-25 19:40:30 +10:00
Stephan
c5e7e1e39e U4-10144 - dont break again 2017-07-24 14:05:04 +02:00
Stephan
14de3fee46 Merge branch dev-v7 into temp-u4-10006 2017-07-21 13:27:56 +02:00
Stephan
c0eaeb3168 Fix tests with issues 2017-07-21 13:06:23 +02:00
Stephan
17d3548bbb Merge branch dev-v7 into temp-u4-10006 2017-07-21 10:04:25 +02:00