File tree Expand file tree Collapse file tree 7 files changed +147
-0
lines changed
Ch04_OutputEscapingSpring/src/main/java/de/dominikschadow/webappsecurity
Ch05_AccessReferenceMaps/src/main/java/de/dominikschadow/webappsecurity Expand file tree Collapse file tree 7 files changed +147
-0
lines changed Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright (C) 2013 Dominik Schadow, dominikschadow@gmail.com
3+ *
4+ * This file is part of JavaWebAppSecurity.
5+ *
6+ * Licensed under the Apache License, Version 2.0 (the "License");
7+ * you may not use this file except in compliance with the License.
8+ * You may obtain a copy of the License at
9+ *
10+ * http://www.apache.org/licenses/LICENSE-2.0
11+ *
12+ * Unless required by applicable law or agreed to in writing, software
13+ * distributed under the License is distributed on an "AS IS" BASIS,
14+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+ * See the License for the specific language governing permissions and
16+ * limitations under the License.
17+ */
118package de .dominikschadow .webappsecurity .controller ;
219
320import org .springframework .stereotype .Controller ;
1027
1128import de .dominikschadow .webappsecurity .domain .Contact ;
1229
30+ /**
31+ *
32+ * @author Dominik Schadow
33+ */
1334@ Controller
1435@ SessionAttributes
1536public class ContactController {
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright (C) 2013 Dominik Schadow, dominikschadow@gmail.com
3+ *
4+ * This file is part of JavaWebAppSecurity.
5+ *
6+ * Licensed under the Apache License, Version 2.0 (the "License");
7+ * you may not use this file except in compliance with the License.
8+ * You may obtain a copy of the License at
9+ *
10+ * http://www.apache.org/licenses/LICENSE-2.0
11+ *
12+ * Unless required by applicable law or agreed to in writing, software
13+ * distributed under the License is distributed on an "AS IS" BASIS,
14+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+ * See the License for the specific language governing permissions and
16+ * limitations under the License.
17+ */
118package de .dominikschadow .webappsecurity .controller ;
219
320import org .springframework .stereotype .Controller ;
623
724import de .dominikschadow .webappsecurity .domain .Contact ;
825
26+ /**
27+ *
28+ * @author Dominik Schadow
29+ */
930@ Controller
1031public class IndexController {
1132 @ RequestMapping ("/index" )
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright (C) 2013 Dominik Schadow, dominikschadow@gmail.com
3+ *
4+ * This file is part of JavaWebAppSecurity.
5+ *
6+ * Licensed under the Apache License, Version 2.0 (the "License");
7+ * you may not use this file except in compliance with the License.
8+ * You may obtain a copy of the License at
9+ *
10+ * http://www.apache.org/licenses/LICENSE-2.0
11+ *
12+ * Unless required by applicable law or agreed to in writing, software
13+ * distributed under the License is distributed on an "AS IS" BASIS,
14+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+ * See the License for the specific language governing permissions and
16+ * limitations under the License.
17+ */
118package de .dominikschadow .webappsecurity .domain ;
219
20+ /**
21+ *
22+ * @author Dominik Schadow
23+ */
324public class Contact {
425 private String firstname ;
526 private String lastname ;
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright (C) 2013 Dominik Schadow, dominikschadow@gmail.com
3+ *
4+ * This file is part of JavaWebAppSecurity.
5+ *
6+ * Licensed under the Apache License, Version 2.0 (the "License");
7+ * you may not use this file except in compliance with the License.
8+ * You may obtain a copy of the License at
9+ *
10+ * http://www.apache.org/licenses/LICENSE-2.0
11+ *
12+ * Unless required by applicable law or agreed to in writing, software
13+ * distributed under the License is distributed on an "AS IS" BASIS,
14+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+ * See the License for the specific language governing permissions and
16+ * limitations under the License.
17+ */
118package de .dominikschadow .webappsecurity ;
219
20+ /**
21+ *
22+ * @author Dominik Schadow
23+ */
324public class Account {
425 private int accountId ;
526 private String name ;
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright (C) 2013 Dominik Schadow, dominikschadow@gmail.com
3+ *
4+ * This file is part of JavaWebAppSecurity.
5+ *
6+ * Licensed under the Apache License, Version 2.0 (the "License");
7+ * you may not use this file except in compliance with the License.
8+ * You may obtain a copy of the License at
9+ *
10+ * http://www.apache.org/licenses/LICENSE-2.0
11+ *
12+ * Unless required by applicable law or agreed to in writing, software
13+ * distributed under the License is distributed on an "AS IS" BASIS,
14+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+ * See the License for the specific language governing permissions and
16+ * limitations under the License.
17+ */
118package de .dominikschadow .webappsecurity ;
219
320import java .sql .Connection ;
1128import org .owasp .esapi .errors .AccessControlException ;
1229import org .owasp .esapi .reference .IntegerAccessReferenceMap ;
1330
31+ /**
32+ *
33+ * @author Dominik Schadow
34+ */
1435public class IntegerAccessReferenceMapSample {
1536 private IntegerAccessReferenceMap accounts = new IntegerAccessReferenceMap ();
1637
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright (C) 2013 Dominik Schadow, dominikschadow@gmail.com
3+ *
4+ * This file is part of JavaWebAppSecurity.
5+ *
6+ * Licensed under the Apache License, Version 2.0 (the "License");
7+ * you may not use this file except in compliance with the License.
8+ * You may obtain a copy of the License at
9+ *
10+ * http://www.apache.org/licenses/LICENSE-2.0
11+ *
12+ * Unless required by applicable law or agreed to in writing, software
13+ * distributed under the License is distributed on an "AS IS" BASIS,
14+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+ * See the License for the specific language governing permissions and
16+ * limitations under the License.
17+ */
118package de .dominikschadow .webappsecurity ;
219
320import java .sql .Connection ;
1128import org .owasp .esapi .errors .AccessControlException ;
1229import org .owasp .esapi .reference .RandomAccessReferenceMap ;
1330
31+ /**
32+ *
33+ * @author Dominik Schadow
34+ */
1435public class RandomAccessReferenceMapSample {
1536 private RandomAccessReferenceMap accounts = new RandomAccessReferenceMap ();
1637
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright (C) 2013 Dominik Schadow, dominikschadow@gmail.com
3+ *
4+ * This file is part of JavaWebAppSecurity.
5+ *
6+ * Licensed under the Apache License, Version 2.0 (the "License");
7+ * you may not use this file except in compliance with the License.
8+ * You may obtain a copy of the License at
9+ *
10+ * http://www.apache.org/licenses/LICENSE-2.0
11+ *
12+ * Unless required by applicable law or agreed to in writing, software
13+ * distributed under the License is distributed on an "AS IS" BASIS,
14+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+ * See the License for the specific language governing permissions and
16+ * limitations under the License.
17+ */
118package de .dominikschadow .webappsecurity ;
219
20+ /**
21+ *
22+ * @author Dominik Schadow
23+ */
324public class User {
425 private int accountId ;
526 private String name ;
You can’t perform that action at this time.
0 commit comments