Skip to content

Commit 2e90786

Browse files
committed
fix sign_url ; rebuild cloudkey.jar ; add build.xml (ant)
1 parent 34d6201 commit 2e90786

File tree

3 files changed

+36
-1
lines changed

3 files changed

+36
-1
lines changed

build.xml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?xml version="1.0"?>
2+
<project name="FatJar cloudkey.jar (experimental)" default="main" basedir=".">
3+
<!-- this file was created by Fat-Jar Eclipse Plug-in -->
4+
<!-- the ANT-Export is in a very early stage, so this -->
5+
<!-- is only experimental, ANT 1.6 or above is -->
6+
<!-- required, feedback is always welcome: -->
7+
<!-- http://sourceforge.net/projects/fjep -->
8+
<!-- uncomment the following lines if using ANT outside Eclipse -->
9+
<!--
10+
<property name="fjepPath" value="reference:file:plugins/net.sf.fjep.fatjar_0.0.31/fatjar.jar"/>
11+
<taskdef name="fatjar.build" classname="net.sf.fjep.anttask.FJBuildTask" classpath="${fjepPath}"/>
12+
<typedef name="fatjar.manifest" classname="net.sf.fjep.anttask.FJManifestType" classpath="${fjepPath}"/>
13+
<typedef name="fatjar.exclude" classname="net.sf.fjep.anttask.FJExcludeType" classpath="${fjepPath}"/>
14+
<typedef name="fatjar.jarsource" classname="net.sf.fjep.anttask.FJJarSourceType" classpath="${fjepPath}"/>
15+
<typedef name="fatjar.filesource" classname="net.sf.fjep.anttask.FJFileSourceType" classpath="${fjepPath}"/>
16+
-->
17+
<!-- uncomment the above lines to use ANT outside of Eclipse -->
18+
<target name="main">
19+
<fatjar.build output="cloudkey.jar">
20+
<fatjar.manifest/>
21+
<fatjar.filesource path="/Users/nyvath/Documents/cloudkey/cloudkey-java/bin" relpath="">
22+
<fatjar.exclude relpath="third-party/"/>
23+
<fatjar.exclude relpath="Config.jsp"/>
24+
<fatjar.exclude relpath="MediaCreate.jsp"/>
25+
<fatjar.exclude relpath="MediaList.jsp"/>
26+
<fatjar.exclude relpath="Upload.jsp"/>
27+
</fatjar.filesource>
28+
<fatjar.jarsource file="/Users/nyvath/Documents/cloudkey/cloudkey-java/src/third-party/jackson-core-asl-1.8.1.jar" relpath=""/>
29+
<fatjar.jarsource file="/Users/nyvath/Documents/cloudkey/cloudkey-java/src/third-party/jackson-mapper-asl-1.8.1.jar" relpath=""/>
30+
<fatjar.jarsource file="/Users/nyvath/Documents/cloudkey/cloudkey-java/src/third-party/commons-codec-1.4.jar" relpath=""/>
31+
<fatjar.jarsource file="/Users/nyvath/Documents/cloudkey/cloudkey-java/src/third-party/commons-logging-1.1.1.jar" relpath=""/>
32+
<fatjar.jarsource file="/Users/nyvath/Documents/cloudkey/cloudkey-java/src/third-party/commons-httpclient-3.1.jar" relpath=""/>
33+
</fatjar.build>
34+
</target>
35+
</project>

cloudkey.jar

3 Bytes
Binary file not shown.

src/net/dmcloud/cloudkey/Helpers.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ static public String sign_url(String url, String secret) throws DCException
107107

108108
static public String sign_url(String url, String secret, int seclevel, String asnum, String ip, String useragent, String[] countries, String[] referers, int expires) throws DCException
109109
{
110-
expires = (expires == 0) ? (int)(new Date().getTime() + 7200) : expires;
110+
expires = (expires == 0) ? (int)((new Date().getTime() / 1000) + 7200) : expires;
111111

112112
// Compute digest
113113
String[] tokens = url.split("\\?");

0 commit comments

Comments
 (0)