Skip to content

Commit 1b7a3a5

Browse files
author
Dave Wichers
committed
Add .gitattributes file to manage line endings on different platforms
and apply this config to all files in this repo.
1 parent 520a421 commit 1b7a3a5

23 files changed

+10797
-10759
lines changed

.gitattributes

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Set the default behavior, in case people don't have core.autocrlf set.
2+
* text=auto
3+
4+
# Explicitly declare text files we want normalized, but converted to
5+
# native line endings on checkout.
6+
.gitignore
7+
LICENSE
8+
*.code
9+
*.css
10+
*.csv
11+
*.html
12+
*.java
13+
*.js
14+
*.map
15+
*.md
16+
*.txt
17+
*.xml
18+
*.xsd
19+
*.MF
20+
*.URL
21+
22+
# Declare files that will always have CRLF line endings on checkout.
23+
*.{cmd,[cC][mM][dD]} text eol=crlf
24+
*.{bat,[bB][aA][tT]} text eol=crlf
25+
26+
# Declare files that will always have LF line endings on checkout.
27+
*.sh text eol=lf
28+
29+
# Denote all files that are truly binary and should not be modified.
30+
.keystore binary
31+
*.eot binary
32+
*.jar binary
33+
*.jpg binary
34+
*.png binary
35+
*.svg binary
36+
*.ttf binary
37+
*.woff binary
38+
*.woff2 binary

OWASP Benchmark.URL

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
[InternetShortcut]
2-
URL=https://localhost:8443/benchmark/
3-
IDList=
4-
HotKey=0
5-
IconFile=./src/main/webapp/favicon.ico
6-
IconIndex=0
1+
[InternetShortcut]
2+
URL=https://localhost:8443/benchmark/
3+
IDList=
4+
HotKey=0
5+
IconFile=./src/main/webapp/favicon.ico
6+
IconIndex=0

results/Benchmark_1.2-ZAPweekly-20160905.xml

+8,838-8,838
Large diffs are not rendered by default.

src/config/note.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<?xml version="1.0" encoding="UTF-8"?><note><to>Tove</to><from>Jani</from><heading>Reminder</heading><body>Don't forget me this weekend!</body></note>
1+
<?xml version="1.0" encoding="UTF-8"?><note><to>Tove</to><from>Jani</from><heading>Reminder</heading><body>Don't forget me this weekend!</body></note>
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,58 @@
1-
/**
2-
* OWASP Benchmark Project
3-
*
4-
* This file is part of the Open Web Application Security Project (OWASP)
5-
* Benchmark Project For details, please see
6-
* <a href="https://owasp.org/www-project-benchmark/">https://owasp.org/www-project-benchmark/</a>.
7-
*
8-
* The OWASP Benchmark is free software: you can redistribute it and/or modify it under the terms
9-
* of the GNU General Public License as published by the Free Software Foundation, version 2.
10-
*
11-
* The OWASP Benchmark is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
12-
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13-
* GNU General Public License for more details
14-
*
15-
* @author Dave Wichers
16-
* @created 2015
17-
*/
18-
19-
package org.owasp.benchmark.helpers;
20-
21-
import javax.servlet.http.Cookie;
22-
import javax.servlet.http.HttpServletRequest;
23-
24-
public class SeparateClassRequest {
25-
private HttpServletRequest request;
26-
27-
28-
public SeparateClassRequest( HttpServletRequest request ) {
29-
this.request = request;
30-
}
31-
32-
public String getTheParameter(String p) {
33-
return request.getParameter(p);
34-
}
35-
36-
public String getTheCookie(String c) {
37-
Cookie[] cookies = request.getCookies();
38-
39-
String value = "";
40-
41-
if (cookies != null) {
42-
for (Cookie cookie : cookies) {
43-
if (cookie.getName().equals(c)) {
44-
value = cookie.getValue();
45-
break;
46-
}
47-
}
48-
}
49-
50-
return value;
51-
}
52-
53-
// This method is a 'safe' source.
54-
public String getTheValue(String p) {
55-
return "bar";
56-
}
57-
58-
}
1+
/**
2+
* OWASP Benchmark Project
3+
*
4+
* This file is part of the Open Web Application Security Project (OWASP)
5+
* Benchmark Project For details, please see
6+
* <a href="https://owasp.org/www-project-benchmark/">https://owasp.org/www-project-benchmark/</a>.
7+
*
8+
* The OWASP Benchmark is free software: you can redistribute it and/or modify it under the terms
9+
* of the GNU General Public License as published by the Free Software Foundation, version 2.
10+
*
11+
* The OWASP Benchmark is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
12+
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
* GNU General Public License for more details
14+
*
15+
* @author Dave Wichers
16+
* @created 2015
17+
*/
18+
19+
package org.owasp.benchmark.helpers;
20+
21+
import javax.servlet.http.Cookie;
22+
import javax.servlet.http.HttpServletRequest;
23+
24+
public class SeparateClassRequest {
25+
private HttpServletRequest request;
26+
27+
28+
public SeparateClassRequest( HttpServletRequest request ) {
29+
this.request = request;
30+
}
31+
32+
public String getTheParameter(String p) {
33+
return request.getParameter(p);
34+
}
35+
36+
public String getTheCookie(String c) {
37+
Cookie[] cookies = request.getCookies();
38+
39+
String value = "";
40+
41+
if (cookies != null) {
42+
for (Cookie cookie : cookies) {
43+
if (cookie.getName().equals(c)) {
44+
value = cookie.getValue();
45+
break;
46+
}
47+
}
48+
}
49+
50+
return value;
51+
}
52+
53+
// This method is a 'safe' source.
54+
public String getTheValue(String p) {
55+
return "bar";
56+
}
57+
58+
}
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
1-
/**
2-
* OWASP Benchmark Project
3-
*
4-
* This file is part of the Open Web Application Security Project (OWASP)
5-
* Benchmark Project For details, please see
6-
* <a href="https://owasp.org/www-project-benchmark/">https://owasp.org/www-project-benchmark/</a>.
7-
*
8-
* The OWASP Benchmark is free software: you can redistribute it and/or modify it under the terms
9-
* of the GNU General Public License as published by the Free Software Foundation, version 2.
10-
*
11-
* The OWASP Benchmark is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
12-
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13-
* GNU General Public License for more details
14-
*
15-
* @author Nick Sanidas
16-
* @created 2015
17-
*/
18-
19-
package org.owasp.benchmark.helpers;
20-
21-
public class Thing1 implements ThingInterface {
22-
23-
@Override
24-
public String doSomething(String i) {
25-
// just assign input to return value
26-
String r = i;
27-
return r;
28-
}
29-
}
1+
/**
2+
* OWASP Benchmark Project
3+
*
4+
* This file is part of the Open Web Application Security Project (OWASP)
5+
* Benchmark Project For details, please see
6+
* <a href="https://owasp.org/www-project-benchmark/">https://owasp.org/www-project-benchmark/</a>.
7+
*
8+
* The OWASP Benchmark is free software: you can redistribute it and/or modify it under the terms
9+
* of the GNU General Public License as published by the Free Software Foundation, version 2.
10+
*
11+
* The OWASP Benchmark is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
12+
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
* GNU General Public License for more details
14+
*
15+
* @author Nick Sanidas
16+
* @created 2015
17+
*/
18+
19+
package org.owasp.benchmark.helpers;
20+
21+
public class Thing1 implements ThingInterface {
22+
23+
@Override
24+
public String doSomething(String i) {
25+
// just assign input to return value
26+
String r = i;
27+
return r;
28+
}
29+
}
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
1-
/**
2-
* OWASP Benchmark Project
3-
*
4-
* This file is part of the Open Web Application Security Project (OWASP)
5-
* Benchmark Project For details, please see
6-
* <a href="https://owasp.org/www-project-benchmark/">https://owasp.org/www-project-benchmark/</a>.
7-
*
8-
* The OWASP Benchmark is free software: you can redistribute it and/or modify it under the terms
9-
* of the GNU General Public License as published by the Free Software Foundation, version 2.
10-
*
11-
* The OWASP Benchmark is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
12-
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13-
* GNU General Public License for more details
14-
*
15-
* @author Nick Sanidas
16-
* @created 2015
17-
*/
18-
19-
package org.owasp.benchmark.helpers;
20-
21-
public class Thing2 implements ThingInterface {
22-
23-
@Override
24-
public String doSomething(String i) {
25-
if (i == null) return "";
26-
String r = new StringBuilder(i).toString();
27-
return r;
28-
}
29-
}
1+
/**
2+
* OWASP Benchmark Project
3+
*
4+
* This file is part of the Open Web Application Security Project (OWASP)
5+
* Benchmark Project For details, please see
6+
* <a href="https://owasp.org/www-project-benchmark/">https://owasp.org/www-project-benchmark/</a>.
7+
*
8+
* The OWASP Benchmark is free software: you can redistribute it and/or modify it under the terms
9+
* of the GNU General Public License as published by the Free Software Foundation, version 2.
10+
*
11+
* The OWASP Benchmark is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
12+
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
* GNU General Public License for more details
14+
*
15+
* @author Nick Sanidas
16+
* @created 2015
17+
*/
18+
19+
package org.owasp.benchmark.helpers;
20+
21+
public class Thing2 implements ThingInterface {
22+
23+
@Override
24+
public String doSomething(String i) {
25+
if (i == null) return "";
26+
String r = new StringBuilder(i).toString();
27+
return r;
28+
}
29+
}
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,53 @@
1-
/**
2-
* OWASP Benchmark Project
3-
*
4-
* This file is part of the Open Web Application Security Project (OWASP)
5-
* Benchmark Project For details, please see
6-
* <a href="https://owasp.org/www-project-benchmark/">https://owasp.org/www-project-benchmark/</a>.
7-
*
8-
* The OWASP Benchmark is free software: you can redistribute it and/or modify it under the terms
9-
* of the GNU General Public License as published by the Free Software Foundation, version 2.
10-
*
11-
* The OWASP Benchmark is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
12-
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13-
* GNU General Public License for more details
14-
*
15-
* @author Nick Sanidas
16-
* @created 2015
17-
*/
18-
19-
package org.owasp.benchmark.helpers;
20-
21-
import java.io.InputStream;
22-
import java.lang.reflect.Constructor;
23-
import java.util.Properties;
24-
25-
public class ThingFactory {
26-
27-
public static ThingInterface createThing() {
28-
29-
Properties props = new Properties();
30-
31-
// create a thing using reflection
32-
try (InputStream thingproperties = ThingFactory.class.getClassLoader().getResourceAsStream("thing.properties")) {
33-
if (thingproperties == null) {
34-
System.out.println("Can't find thing.properties");
35-
return new Thing2();
36-
}
37-
props.load(thingproperties);
38-
String which = "org.owasp.benchmark.helpers." + props.getProperty("thing");
39-
40-
Class<?> thing = Class.forName(which);
41-
Constructor<?> thingConstructor = thing.getConstructor();
42-
Object thingInstance = thingConstructor.newInstance();
43-
44-
return (ThingInterface)thingInstance;
45-
46-
} catch (Exception e) {
47-
System.out.println("Error constructing Thing.");
48-
e.printStackTrace();
49-
return new Thing1();
50-
}
51-
}
52-
53-
}
1+
/**
2+
* OWASP Benchmark Project
3+
*
4+
* This file is part of the Open Web Application Security Project (OWASP)
5+
* Benchmark Project For details, please see
6+
* <a href="https://owasp.org/www-project-benchmark/">https://owasp.org/www-project-benchmark/</a>.
7+
*
8+
* The OWASP Benchmark is free software: you can redistribute it and/or modify it under the terms
9+
* of the GNU General Public License as published by the Free Software Foundation, version 2.
10+
*
11+
* The OWASP Benchmark is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
12+
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
* GNU General Public License for more details
14+
*
15+
* @author Nick Sanidas
16+
* @created 2015
17+
*/
18+
19+
package org.owasp.benchmark.helpers;
20+
21+
import java.io.InputStream;
22+
import java.lang.reflect.Constructor;
23+
import java.util.Properties;
24+
25+
public class ThingFactory {
26+
27+
public static ThingInterface createThing() {
28+
29+
Properties props = new Properties();
30+
31+
// create a thing using reflection
32+
try (InputStream thingproperties = ThingFactory.class.getClassLoader().getResourceAsStream("thing.properties")) {
33+
if (thingproperties == null) {
34+
System.out.println("Can't find thing.properties");
35+
return new Thing2();
36+
}
37+
props.load(thingproperties);
38+
String which = "org.owasp.benchmark.helpers." + props.getProperty("thing");
39+
40+
Class<?> thing = Class.forName(which);
41+
Constructor<?> thingConstructor = thing.getConstructor();
42+
Object thingInstance = thingConstructor.newInstance();
43+
44+
return (ThingInterface)thingInstance;
45+
46+
} catch (Exception e) {
47+
System.out.println("Error constructing Thing.");
48+
e.printStackTrace();
49+
return new Thing1();
50+
}
51+
}
52+
53+
}

0 commit comments

Comments
 (0)