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

Stacktrace when entering search term with unmatched double quotes #11

Closed
rbsec opened this issue Mar 9, 2015 · 0 comments
Closed

Stacktrace when entering search term with unmatched double quotes #11

rbsec opened this issue Mar 9, 2015 · 0 comments
Assignees
Labels
Milestone

Comments

@rbsec
Copy link

rbsec commented Mar 9, 2015

Entering a search term that contains an unmatched number of doulbe-quote characters (") results in a stacktrace (below). If the number of double-quote characters is even (0, 2, 4) it works fine, but having an unmatched one fails. An example search string that causes this error is as follows:

http://[removed]/search?q=zzz"

The site is using an older version of Umbraco (I believe it's 7.1.6), so the line number in the stacktrace (62) doesn't match up the the latest version of Examine (looking at the code I think it should be line 79 in the current version).

I realise this isn't the most helpful bug report - I don't have access to the source of the website, so I'm afraid I can't give any useful information about exact versions of software in use (and won't be able to text a fixed version).

~rbsec

Last Error: System.Web.HttpCompileException
Controller: SearchResultPage
Action: ArticleList
Exception: mscorlib
Length cannot be less than zero. Parameter name: length

System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy)
Examine.StringExtensions.RemoveStopWords(String searchText) in x:\Projects\Examine\Examine\Projects\Examine\StringExtensions.cs:line 62
Umbraco.Extensions.Services.SiteSearchService.GetPagesAndEvents(String searchTerm, Nullable`1 enf, Nullable`1 wildcardMaxLenth)
Umbraco.Extensions.Services.ContentService.SearchResults_viewModelGet(String queryString, Nullable`1 enf, Nullable`1 wildcardMaxLength)
Umbraco.Extensions.Controllers.SearchResultPageController.ArticleList()
lambda_method(Closure , ControllerBase , Object[] )
System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) 
@Shazwazza Shazwazza added this to the v0.1.62 milestone Mar 9, 2015
@Shazwazza Shazwazza self-assigned this Mar 9, 2015
Shazwazza added a commit that referenced this issue Apr 1, 2015
@Shazwazza Shazwazza added the bug label Apr 1, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants