This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var express = require('express') | |
const path = require('path') | |
const https = require('https'); | |
const fs = require('fs'); | |
var app = express() | |
app.get('/index.html', function (req, res) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<VirtualHost *:80> | |
ServerAdmin [email protected] | |
DocumentRoot "c:/Apache24/docs/myexample.com" | |
ServerName myexample.com | |
ErrorLog "logs/myexample.com-error.log" | |
CustomLog "logs/myexample.com-access.log" common | |
ProxyHTMLEnable On | |
ProxyPassMatch "/test1/(.*)" "http://localhost:8080/$1" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package antisamy; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.io.PrintWriter; | |
import javax.servlet.ServletException; | |
import javax.servlet.annotation.WebServlet; | |
import javax.servlet.http.HttpServlet; | |
import javax.servlet.http.HttpServletRequest; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.aspectj.core.aspects; | |
import java.util.Arrays; | |
import java.util.Enumeration; | |
import org.apache.sling.api.SlingHttpServletRequest; | |
import org.apache.sling.api.SlingHttpServletResponse; | |
import org.aspectj.lang.JoinPoint; | |
import org.aspectj.lang.ProceedingJoinPoint; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example; | |
import java.io.Serializable; | |
public class Employee implements Serializable { | |
private static final long serialVersionUID = 1L; | |
String name; | |
String title; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example; | |
import java.io.FileInputStream; | |
import java.io.FileOutputStream; | |
import java.io.ObjectInputStream; | |
import java.io.ObjectOutputStream; | |
public class SerializationFilter { | |
public static void main(String[] args) throws Exception{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example; | |
import java.io.ObjectInputFilter; | |
import java.io.ObjectInputFilter.FilterInfo; | |
public class CustomMethodFilter { | |
static ObjectInputFilter.Status classFilter(FilterInfo info) { | |
Class<?> serialClass = info.serialClass(); | |
if (serialClass != null) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example; | |
import java.io.ObjectInputFilter; | |
public class CustomClassFilter implements ObjectInputFilter{ | |
public Status checkInput(FilterInfo filterInfo) { | |
Class<?> clazz = filterInfo.serialClass(); | |
if (clazz != null) { | |
return !(clazz.getName().equals("com.example.Employee")) ? Status.ALLOWED : Status.REJECTED; //clazz.getPackage().equals("com.example") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.sample.servlets; | |
import java.io.IOException; | |
import javax.servlet.Servlet; | |
import javax.servlet.ServletException; | |
import org.apache.sling.api.SlingHttpServletRequest; | |
import org.apache.sling.api.SlingHttpServletResponse; | |
import org.apache.sling.api.servlets.HttpConstants; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.sample.servlets; | |
import java.io.IOException; | |
import javax.servlet.Servlet; | |
import javax.servlet.ServletException; | |
import org.apache.sling.api.SlingHttpServletRequest; | |
import org.apache.sling.api.SlingHttpServletResponse; | |
import org.apache.sling.api.servlets.HttpConstants; |