diff --git a/java/ql/src/semmle/code/java/dataflow/FlowSources.qll b/java/ql/src/semmle/code/java/dataflow/FlowSources.qll index 52bd93fae24..a3a806ac3de 100644 --- a/java/ql/src/semmle/code/java/dataflow/FlowSources.qll +++ b/java/ql/src/semmle/code/java/dataflow/FlowSources.qll @@ -108,7 +108,6 @@ private class MessageBodyReaderParameterSource extends RemoteFlowSource { override string getSourceType() { result = "MessageBodyReader parameter" } } -<<<<<<< HEAD private class SpringMultipartRequestSource extends RemoteFlowSource { SpringMultipartRequestSource() { exists(MethodAccess ma, Method m | @@ -129,15 +128,6 @@ class PlayParameterSource extends RemoteFlowSource { PlayParameterSource() { exists(PlayActionMethodQueryParameter p | p = this.asParameter()) or exists(PlayMVCHTTPRequestHeaderMethods m | m.getQueryString().getAnArgument() = this.asExpr()) -======= -class PlayParameterSource extends RemoteFlowSource { - PlayParameterSource() { - exists(PlayActionQueryParameter p | p = this.asParameter()) - or - exists(PlayHTTPRequestHeaderMethods m | - m.hasName("getQueryString") and m.getAParameter() = this.asParameter() - ) ->>>>>>> fa523e456f96493dcc08b819ad4bd620cca789b8 } override string getSourceType() { result = "Play Query Parameters" } diff --git a/java/ql/src/semmle/code/java/frameworks/play/PlayAddCSRFToken.qll b/java/ql/src/semmle/code/java/frameworks/play/PlayAddCSRFToken.qll index a3e15328ed6..3b289e23c37 100644 --- a/java/ql/src/semmle/code/java/frameworks/play/PlayAddCSRFToken.qll +++ b/java/ql/src/semmle/code/java/frameworks/play/PlayAddCSRFToken.qll @@ -1,16 +1,9 @@ import java /** -<<<<<<< HEAD * Play Framework AddCSRFToken Annotation * * Documentation: https://www.playframework.com/documentation/2.8.x/JavaCsrf -======= - * Play Framework AddCSRFToken - * - * @description Gets the methods using AddCSRFToken annotation. - * (https://www.playframework.com/documentation/2.6.x/JavaBodyParsers#Choosing-an-explicit-body-parser) ->>>>>>> fa523e456f96493dcc08b819ad4bd620cca789b8 */ class PlayAddCSRFTokenAnnotation extends Annotation { PlayAddCSRFTokenAnnotation() { diff --git a/java/ql/src/semmle/code/java/frameworks/play/PlayAsyncResult.qll b/java/ql/src/semmle/code/java/frameworks/play/PlayAsyncResult.qll index e8ed9f09436..27edc7a2521 100644 --- a/java/ql/src/semmle/code/java/frameworks/play/PlayAsyncResult.qll +++ b/java/ql/src/semmle/code/java/frameworks/play/PlayAsyncResult.qll @@ -1,16 +1,9 @@ import java /** -<<<<<<< HEAD * Play Framework Async Promise - Gets the Promise Generic Member/Type of (play.libs.F) * * Documentation: https://www.playframework.com/documentation/2.5.1/api/java/play/libs/F.Promise.html -======= - * Play Framework Async Promise of Generic Result - * - * @description Gets the Promise Generic Type of (play.libs.F), This is async in 2.6x and below. - * (https://www.playframework.com/documentation/2.5.1/api/java/play/libs/F.Promise.html) ->>>>>>> fa523e456f96493dcc08b819ad4bd620cca789b8 */ class PlayAsyncResultPromise extends Member { PlayAsyncResultPromise() { @@ -23,16 +16,9 @@ class PlayAsyncResultPromise extends Member { } /** -<<<<<<< HEAD * Play Framework Async Generic Result - Gets the CompletionStage Generic Type of (java.util.concurrent) * * Documentation: https://www.playframework.com/documentation/2.6.x/JavaAsync -======= - * Play Framework Async Generic Result extending generic promise API called CompletionStage. - * - * @description Gets the CompletionStage Generic Type of (java.util.concurrent) - * (https://www.playframework.com/documentation/2.6.x/JavaAsync) ->>>>>>> fa523e456f96493dcc08b819ad4bd620cca789b8 */ class PlayAsyncResultCompletionStage extends Type { PlayAsyncResultCompletionStage() { diff --git a/java/ql/src/semmle/code/java/frameworks/play/PlayBodyParser.qll b/java/ql/src/semmle/code/java/frameworks/play/PlayBodyParser.qll index 1a8a9aa597b..167bea85d4e 100644 --- a/java/ql/src/semmle/code/java/frameworks/play/PlayBodyParser.qll +++ b/java/ql/src/semmle/code/java/frameworks/play/PlayBodyParser.qll @@ -1,16 +1,9 @@ import java /** -<<<<<<< HEAD * Play Framework Explicit Body Parser Annotation * * Documentation: https://www.playframework.com/documentation/2.8.x/JavaBodyParsers#Choosing-an-explicit-body-parser -======= - * Play Framework Explicit Body Parser - * - * @description Gets the methods using the explicit body parser annotation. The methods are usually controller action methods - * (https://www.playframework.com/documentation/2.8.x/JavaBodyParsers#Choosing-an-explicit-body-parser) ->>>>>>> fa523e456f96493dcc08b819ad4bd620cca789b8 */ class PlayBodyParserAnnotation extends Annotation { PlayBodyParserAnnotation() { this.getType().hasQualifiedName("play.mvc", "BodyParser<>$Of") } diff --git a/java/ql/src/semmle/code/java/frameworks/play/PlayController.qll b/java/ql/src/semmle/code/java/frameworks/play/PlayController.qll index 45489c4e216..af05d96de23 100644 --- a/java/ql/src/semmle/code/java/frameworks/play/PlayController.qll +++ b/java/ql/src/semmle/code/java/frameworks/play/PlayController.qll @@ -4,24 +4,13 @@ import semmle.code.java.frameworks.play.PlayMVCResult /** * Play MVC Framework Controller -<<<<<<< HEAD -======= - * - * @description Gets the play.mvc.Controller class ->>>>>>> fa523e456f96493dcc08b819ad4bd620cca789b8 */ class PlayMVCControllerClass extends Class { PlayMVCControllerClass() { this.hasQualifiedName("play.mvc", "Controller") } } /** -<<<<<<< HEAD * Play Framework Controllers which extends/implements PlayMVCController recursively - Used to find all Controllers -======= - * Play Framework Controller which extends/implements - * - * @description Gets the classes which extends play.mvc.controller rescursively. ->>>>>>> fa523e456f96493dcc08b819ad4bd620cca789b8 */ class PlayController extends Class { PlayController() { @@ -30,7 +19,6 @@ class PlayController extends Class { } /** -<<<<<<< HEAD * Play Framework Controller Action Methods - Mappings to route files * * Sample Route - `POST /login @com.linkedin.Application.login()` @@ -49,13 +37,6 @@ class PlayController extends Class { * ``` * * Documentation: https://www.playframework.com/documentation/2.8.x/JavaActions -======= - * Play Framework Controller Action Methods - * - * @description Gets the controller action methods defined against it. - * (https://www.playframework.com/documentation/2.8.x/JavaActions) - * @tip Checking for Public methods usually retrieves direct controller mapped methods defined in routes. ->>>>>>> fa523e456f96493dcc08b819ad4bd620cca789b8 */ class PlayControllerActionMethod extends Method { PlayControllerActionMethod() { @@ -71,7 +52,6 @@ class PlayControllerActionMethod extends Method { } /** -<<<<<<< HEAD * Play Action-Method parameters. These are a source of user input * * Example - Class get's `username` & `password` as valid parameters @@ -85,12 +65,6 @@ class PlayControllerActionMethod extends Method { */ class PlayActionMethodQueryParameter extends Parameter { PlayActionMethodQueryParameter() { -======= - * Play Action-Method parameters, these are essentially part of routes. - */ -class PlayActionQueryParameter extends Parameter { - PlayActionQueryParameter() { ->>>>>>> fa523e456f96493dcc08b819ad4bd620cca789b8 exists(PlayControllerActionMethod a | a.isPublic() and this = a.getAParameter() diff --git a/java/ql/src/semmle/code/java/frameworks/play/PlayMVCResult.qll b/java/ql/src/semmle/code/java/frameworks/play/PlayMVCResult.qll index abd697aa3ab..027f8fe0907 100644 --- a/java/ql/src/semmle/code/java/frameworks/play/PlayMVCResult.qll +++ b/java/ql/src/semmle/code/java/frameworks/play/PlayMVCResult.qll @@ -1,14 +1,7 @@ import java /** -<<<<<<< HEAD * Play MVC Framework Result Class -======= - * Play MVC Framework Result - * - * @description Gets the play.mvc.Result class - Used to set a HTTP result with a status code, a set of HTTP headers and a body to be sent to the web client. - * (https://www.playframework.com/documentation/2.8.x/JavaActions) ->>>>>>> fa523e456f96493dcc08b819ad4bd620cca789b8 */ class PlayMVCResultClass extends Class { PlayMVCResultClass() { this.hasQualifiedName("play.mvc", "Result") } diff --git a/java/ql/src/semmle/code/java/frameworks/play/PlayMVCResults.qll b/java/ql/src/semmle/code/java/frameworks/play/PlayMVCResults.qll index ac6e4766475..c03a9358ce5 100644 --- a/java/ql/src/semmle/code/java/frameworks/play/PlayMVCResults.qll +++ b/java/ql/src/semmle/code/java/frameworks/play/PlayMVCResults.qll @@ -1,23 +1,15 @@ import java /** -<<<<<<< HEAD * Play MVC Framework Results Class * * Documentation: https://www.playframework.com/documentation/2.8.x/JavaActions -======= - * Play MVC Framework Results - * - * @description Gets the play.mvc.Results class - Helper utilities to generate results - * (https://www.playframework.com/documentation/2.8.x/JavaActions) ->>>>>>> fa523e456f96493dcc08b819ad4bd620cca789b8 */ class PlayMVCResultsClass extends Class { PlayMVCResultsClass() { this.hasQualifiedName("play.mvc", "Results") } } /** -<<<<<<< HEAD * Play Framework mvc.Results Methods - `ok`, `status`, `redirect` * * Documentation: https://www.playframework.com/documentation/2.5.8/api/java/play/mvc/Results.html @@ -37,27 +29,5 @@ class PlayMVCResultsMethods extends Method { */ MethodAccess getARedirectAccess() { this.hasName("redirect") and result = this.getAReference() -======= - * Play Framework mvc.Results Methods - * - * @description Gets the methods of play.mvc.Results like - ok, status, redirect etc. - * (https://www.playframework.com/documentation/2.5.8/api/java/play/mvc/Results.html) - */ -class PlayHTTPResultsMethods extends Method { - PlayHTTPResultsMethods() { this.getDeclaringType() instanceof PlayMVCResultsClass } - - /** - * Gets all references to play.mvc.Results ok method - */ - MethodAccess ok() { - exists(MethodAccess ma | ma = this.getAReference() and this.hasName("ok") | result = ma) - } - - /** - * Gets all references to play.mvc.Results redirect method - */ - MethodAccess redirect() { - exists(MethodAccess ma | ma = this.getAReference() and this.hasName("redirect") | result = ma) ->>>>>>> fa523e456f96493dcc08b819ad4bd620cca789b8 } }