diff --git a/htroot/Status.java b/htroot/Status.java
index 3e44717fb..a137ce0ea 100644
--- a/htroot/Status.java
+++ b/htroot/Status.java
@@ -103,11 +103,11 @@ public class Status
redirect = true;
} else if ( post.containsKey("popup") ) {
final boolean trigger_enabled = post.getBoolean("popup");
- sb.setConfig("browserPopUpTrigger", trigger_enabled);
+ sb.setConfig(SwitchboardConstants.BROWSER_POP_UP_TRIGGER, trigger_enabled);
redirect = true;
} else if ( post.containsKey("tray") ) {
final boolean trigger_enabled = post.getBoolean("tray");
- sb.setConfig("trayIcon", trigger_enabled);
+ sb.setConfig(SwitchboardConstants.TRAY_ICON_ENABLED, trigger_enabled);
redirect = true;
}
@@ -303,7 +303,7 @@ public class Status
prop.put("otherPeers", "0"); // not online
}
- if ( !sb.getConfigBool("browserPopUpTrigger", false) ) {
+ if ( !sb.getConfigBool(SwitchboardConstants.BROWSER_POP_UP_TRIGGER, false) ) {
prop.put("popup", "0");
} else {
prop.put("popup", "1");
@@ -311,7 +311,7 @@ public class Status
if ( !OS.isWindows ) {
prop.put("tray", "2");
- } else if ( !sb.getConfigBool("trayIcon", false) ) {
+ } else if ( !sb.getConfigBool(SwitchboardConstants.TRAY_ICON_ENABLED, false) ) {
prop.put("tray", "0");
} else {
prop.put("tray", "1");
diff --git a/pom.xml b/pom.xml
index 969da8d1c..e12372ccc 100644
--- a/pom.xml
+++ b/pom.xml
@@ -120,27 +120,6 @@
-
-
- maven-assembly-plugin
- 2.5.3
-
-
- assembly.xml
-
- yacy_v${project.version}_${DSTAMP}_${releaseNr}
- RELEASE
- false
-
-
-
- package
-
- single
-
-
-
-
@@ -184,6 +163,7 @@
htroot/*.java
+ false
@@ -265,7 +245,7 @@
install-webcat-jar
- clean
+ validate
install-file
@@ -281,7 +261,7 @@
install-J7Zip-jar
- clean
+ validate
install-file
@@ -301,6 +281,35 @@
+
+
+ release-profile
+
+
+
+ maven-assembly-plugin
+ 2.5.3
+
+
+ assembly.xml
+
+ yacy_v${project.version}_${DSTAMP}_${releaseNr}
+ RELEASE
+ false
+
+
+
+ package
+
+ single
+
+
+
+
+
+
+
+
report
diff --git a/source/net/yacy/document/parser/swfParser.java b/source/net/yacy/document/parser/swfParser.java
index 47e0ac516..93cb00aa7 100644
--- a/source/net/yacy/document/parser/swfParser.java
+++ b/source/net/yacy/document/parser/swfParser.java
@@ -71,6 +71,19 @@ public class swfParser extends AbstractParser implements Parser {
final SWF2HTML swf2html = new SWF2HTML();
String contents = "";
try {
+ // read and check file signature (library expect stream positioned after signature)
+ // magic bytes according to specification http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/devnet/swf/pdf/swf-file-format-spec.pdf
+ // 0x46, 0x57, 0x53 (“FWS”) signature indicates an uncompressed SWF file
+ // 0x43, 0x57, 0x53 (“CWS”) indicates that the entire file after the first 8 bytes was compressed by using the ZLIB
+ // 0x5a, 0x57, 0x53 (“ZWS”) indicates that the entire file after the first 8 bytes was compressed by using the LZMA
+ int magic = source.read();
+ if (magic != 'F') // F=uncompressed, C= ZIP-compressed Z=LZMA-compressed
+ throw new Parser.Failure("compressed swf file not supported", location); // compressed not supported yet
+ magic = source.read(); // always 'W'
+ if (magic != 'W') throw new Parser.Failure("not a swf file (wrong file signature)", location);
+ magic = source.read(); // always 'S'
+ if (magic != 'S') throw new Parser.Failure("not a swf file (wrong file signature)", location);
+
contents = swf2html.convertSWFToHTML(source);
} catch (final NegativeArraySizeException e) {
throw new Parser.Failure(e.getMessage(), location);
@@ -82,8 +95,6 @@ public class swfParser extends AbstractParser implements Parser {
String url = null;
String urlnr = null;
final String linebreak = System.getProperty("line.separator");
- final List abstrct = new ArrayList();
- //TreeSet images = null;
final List anchors = new ArrayList();
int urls = 0;
int urlStart = -1;
@@ -120,17 +131,17 @@ public class swfParser extends AbstractParser implements Parser {
replaceAll("\n"," ").
replaceAll("\r"," ").
replaceAll("\t"," ")), // title
- "", // TODO: AUTHOR
- "",
+ null, // TODO: AUTHOR
+ null,
null, // an array of section headlines
- abstrct, // an abstract
- 0.0f, 0.0f,
+ null, // an abstract
+ 0.0d, 0.0d,
contents, // the parsed document text
anchors, // a map of extracted anchors
null,
null,
false,
- new Date())}; // a treeset of image URLs
+ new Date())};
} catch (final Exception e) {
if (e instanceof InterruptedException) throw (InterruptedException) e;