Skip to content

Commit

Permalink
fixes for cn1, PAM
Browse files Browse the repository at this point in the history
  • Loading branch information
Devendra committed Jul 11, 2013
1 parent e3aebf2 commit 97843b8
Show file tree
Hide file tree
Showing 33 changed files with 102 additions and 58 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
07-11-13 3.5.4
. fixed issue with PAM audit when auth key is set
. fixed issue in cn1 where global headers were not getting added
. fixed issue in PAM, where ttl 0 was being considered invalid

07-09-13 3.5.3
. added constructor for setting iv
. beta1 of CN1 port
Expand Down
Binary file modified android/Pubnub-Android-3.5.3.jar
Binary file not shown.
Binary file modified android/examples/PubnubExample/libs/Pubnub-Android-3.5.3.jar
Binary file not shown.
Binary file modified android/examples/SubscribeAtBoot/libs/Pubnub-Android-3.5.3.jar
Binary file not shown.
Binary file modified blackberry/Pubnub-BlackBerry-3.5.3.jar
Binary file not shown.
Binary file modified codenameone/pubnub-codenameone-3.5.3.cn1lib
Binary file not shown.
2 changes: 1 addition & 1 deletion codenameone/src/com/pubnub/api/HttpClientCore.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public synchronized HttpResponse fetch(String url, Hashtable headers)
IOException excp = null;
PubnubCn1Response pcr = null;
try {
pcr = connection.fetch(url, requestTimeout, headers);
pcr = connection.fetch(url, requestTimeout, PubnubUtil.hashtableClone(headers,_headers));
} catch (IOException ex) {
excp = ex;
}
Expand Down
Binary file modified j2me/Pubnub-MicroEdition-3.5.3.jar
Binary file not shown.
Binary file modified java/Pubnub-StandardEdition-3.5.3.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions java/doc/allclasses-frame.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_37) on Wed Jul 10 10:03:03 IST 2013 -->
<!-- Generated by javadoc (build 1.6.0_37) on Thu Jul 11 09:03:26 IST 2013 -->
<TITLE>
All Classes
</TITLE>

<META NAME="date" CONTENT="2013-07-10">
<META NAME="date" CONTENT="2013-07-11">

<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">

Expand Down
4 changes: 2 additions & 2 deletions java/doc/allclasses-noframe.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_37) on Wed Jul 10 10:03:03 IST 2013 -->
<!-- Generated by javadoc (build 1.6.0_37) on Thu Jul 11 09:03:26 IST 2013 -->
<TITLE>
All Classes
</TITLE>

<META NAME="date" CONTENT="2013-07-10">
<META NAME="date" CONTENT="2013-07-11">

<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">

Expand Down
4 changes: 2 additions & 2 deletions java/doc/com/pubnub/api/Callback.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_37) on Wed Jul 10 10:03:02 IST 2013 -->
<!-- Generated by javadoc (build 1.6.0_37) on Thu Jul 11 09:03:24 IST 2013 -->
<TITLE>
Callback
</TITLE>

<META NAME="date" CONTENT="2013-07-10">
<META NAME="date" CONTENT="2013-07-11">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">

Expand Down
4 changes: 2 additions & 2 deletions java/doc/com/pubnub/api/HttpUtil.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_37) on Wed Jul 10 10:03:02 IST 2013 -->
<!-- Generated by javadoc (build 1.6.0_37) on Thu Jul 11 09:03:25 IST 2013 -->
<TITLE>
HttpUtil
</TITLE>

<META NAME="date" CONTENT="2013-07-10">
<META NAME="date" CONTENT="2013-07-11">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">

Expand Down
4 changes: 2 additions & 2 deletions java/doc/com/pubnub/api/Pubnub.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_37) on Wed Jul 10 10:03:02 IST 2013 -->
<!-- Generated by javadoc (build 1.6.0_37) on Thu Jul 11 09:03:25 IST 2013 -->
<TITLE>
Pubnub
</TITLE>

<META NAME="date" CONTENT="2013-07-10">
<META NAME="date" CONTENT="2013-07-11">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">

Expand Down
4 changes: 2 additions & 2 deletions java/doc/com/pubnub/api/PubnubError.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_37) on Wed Jul 10 10:03:03 IST 2013 -->
<!-- Generated by javadoc (build 1.6.0_37) on Thu Jul 11 09:03:25 IST 2013 -->
<TITLE>
PubnubError
</TITLE>

<META NAME="date" CONTENT="2013-07-10">
<META NAME="date" CONTENT="2013-07-11">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">

Expand Down
4 changes: 2 additions & 2 deletions java/doc/com/pubnub/api/PubnubException.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_37) on Wed Jul 10 10:03:03 IST 2013 -->
<!-- Generated by javadoc (build 1.6.0_37) on Thu Jul 11 09:03:25 IST 2013 -->
<TITLE>
PubnubException
</TITLE>

<META NAME="date" CONTENT="2013-07-10">
<META NAME="date" CONTENT="2013-07-11">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">

Expand Down
4 changes: 2 additions & 2 deletions java/doc/com/pubnub/api/PubnubUtil.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_37) on Wed Jul 10 10:03:03 IST 2013 -->
<!-- Generated by javadoc (build 1.6.0_37) on Thu Jul 11 09:03:25 IST 2013 -->
<TITLE>
PubnubUtil
</TITLE>

<META NAME="date" CONTENT="2013-07-10">
<META NAME="date" CONTENT="2013-07-11">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">

Expand Down
4 changes: 2 additions & 2 deletions java/doc/com/pubnub/api/package-frame.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_37) on Wed Jul 10 10:03:03 IST 2013 -->
<!-- Generated by javadoc (build 1.6.0_37) on Thu Jul 11 09:03:25 IST 2013 -->
<TITLE>
com.pubnub.api
</TITLE>

<META NAME="date" CONTENT="2013-07-10">
<META NAME="date" CONTENT="2013-07-11">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">

Expand Down
4 changes: 2 additions & 2 deletions java/doc/com/pubnub/api/package-summary.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_37) on Wed Jul 10 10:03:03 IST 2013 -->
<!-- Generated by javadoc (build 1.6.0_37) on Thu Jul 11 09:03:25 IST 2013 -->
<TITLE>
com.pubnub.api
</TITLE>

<META NAME="date" CONTENT="2013-07-10">
<META NAME="date" CONTENT="2013-07-11">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">

Expand Down
4 changes: 2 additions & 2 deletions java/doc/com/pubnub/api/package-tree.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_37) on Wed Jul 10 10:03:03 IST 2013 -->
<!-- Generated by javadoc (build 1.6.0_37) on Thu Jul 11 09:03:25 IST 2013 -->
<TITLE>
com.pubnub.api Class Hierarchy
</TITLE>

<META NAME="date" CONTENT="2013-07-10">
<META NAME="date" CONTENT="2013-07-11">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">

Expand Down
4 changes: 2 additions & 2 deletions java/doc/constant-values.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_37) on Wed Jul 10 10:03:03 IST 2013 -->
<!-- Generated by javadoc (build 1.6.0_37) on Thu Jul 11 09:03:26 IST 2013 -->
<TITLE>
Constant Field Values
</TITLE>

<META NAME="date" CONTENT="2013-07-10">
<META NAME="date" CONTENT="2013-07-11">

<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">

Expand Down
4 changes: 2 additions & 2 deletions java/doc/deprecated-list.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_37) on Wed Jul 10 10:03:03 IST 2013 -->
<!-- Generated by javadoc (build 1.6.0_37) on Thu Jul 11 09:03:26 IST 2013 -->
<TITLE>
Deprecated List
</TITLE>

<META NAME="date" CONTENT="2013-07-10">
<META NAME="date" CONTENT="2013-07-11">

<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">

Expand Down
4 changes: 2 additions & 2 deletions java/doc/help-doc.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_37) on Wed Jul 10 10:03:03 IST 2013 -->
<!-- Generated by javadoc (build 1.6.0_37) on Thu Jul 11 09:03:26 IST 2013 -->
<TITLE>
API Help
</TITLE>

<META NAME="date" CONTENT="2013-07-10">
<META NAME="date" CONTENT="2013-07-11">

<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">

Expand Down
4 changes: 2 additions & 2 deletions java/doc/index-all.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_37) on Wed Jul 10 10:03:03 IST 2013 -->
<!-- Generated by javadoc (build 1.6.0_37) on Thu Jul 11 09:03:26 IST 2013 -->
<TITLE>
Index
</TITLE>

<META NAME="date" CONTENT="2013-07-10">
<META NAME="date" CONTENT="2013-07-11">

<LINK REL ="stylesheet" TYPE="text/css" HREF="./stylesheet.css" TITLE="Style">

Expand Down
2 changes: 1 addition & 1 deletion java/doc/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc on Wed Jul 10 10:03:03 IST 2013-->
<!-- Generated by javadoc on Thu Jul 11 09:03:26 IST 2013-->
<TITLE>
Generated Documentation (Untitled)
</TITLE>
Expand Down
4 changes: 2 additions & 2 deletions java/doc/overview-tree.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_37) on Wed Jul 10 10:03:03 IST 2013 -->
<!-- Generated by javadoc (build 1.6.0_37) on Thu Jul 11 09:03:26 IST 2013 -->
<TITLE>
Class Hierarchy
</TITLE>

<META NAME="date" CONTENT="2013-07-10">
<META NAME="date" CONTENT="2013-07-11">

<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">

Expand Down
4 changes: 2 additions & 2 deletions java/doc/serialized-form.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_37) on Wed Jul 10 10:03:03 IST 2013 -->
<!-- Generated by javadoc (build 1.6.0_37) on Thu Jul 11 09:03:26 IST 2013 -->
<TITLE>
Serialized Form
</TITLE>

<META NAME="date" CONTENT="2013-07-10">
<META NAME="date" CONTENT="2013-07-11">

<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">

Expand Down
Binary file modified java/jars/Pubnub-UnitTests-3.5.3.jar
Binary file not shown.
Binary file modified java/jars/PubnubDemoConsole.jar
Binary file not shown.
Binary file modified java/jars/PubnubExample.jar
Binary file not shown.
14 changes: 8 additions & 6 deletions java/src/com/pubnub/api/Pubnub.java
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ private String pamSign(String key, String data) throws PubnubException {
*/
public void pamGrant(final String channel, String auth_key, boolean read,
boolean write, final Callback callback) {
pamGrant(channel, auth_key, read, write, 0, callback);
pamGrant(channel, auth_key, read, write, -1, callback);
}

/** Grant r/w access based on channel and auth key
Expand All @@ -592,7 +592,7 @@ public void pamGrant(final String channel, String auth_key, boolean read,
public void pamGrant(final String channel, String auth_key, boolean read,
boolean write, int ttl, final Callback callback) {

Hashtable parameters = hashtableClone(params);
Hashtable parameters = PubnubUtil.hashtableClone(params);

String r = (read) ? "1" : "0";
String w = (write) ? "1" : "0";
Expand All @@ -610,7 +610,7 @@ public void pamGrant(final String channel, String auth_key, boolean read,
String sign_input = this.SUBSCRIBE_KEY + "\n" + this.PUBLISH_KEY + "\n"
+ "grant" + "\n" + "auth=" + auth_key + "&" + "channel="
+ channel + "&" + "r=" + r + "&" + "timestamp=" + timestamp
+ ((ttl > 0)?"&" + "ttl=" + ttl:"")
+ ((ttl > -1)?"&" + "ttl=" + ttl:"")
+ "&" + "w=" + w;


Expand Down Expand Up @@ -665,7 +665,8 @@ public void handleError(HttpRequest hreq, PubnubError error) {
*/
public void pamAudit(final Callback callback) {

Hashtable parameters = hashtableClone(params);
Hashtable parameters = PubnubUtil.hashtableClone(params);
parameters.remove("auth");

String signature = "0";

Expand Down Expand Up @@ -729,7 +730,8 @@ public void handleError(HttpRequest hreq, PubnubError error) {
public void pamAudit(final String channel,
final Callback callback) {

Hashtable parameters = hashtableClone(params);
Hashtable parameters = PubnubUtil.hashtableClone(params);
parameters.remove("auth");

String signature = "0";

Expand Down Expand Up @@ -794,7 +796,7 @@ public void handleError(HttpRequest hreq, PubnubError error) {
public void pamAudit(final String channel, String auth_key,
final Callback callback) {

Hashtable parameters = hashtableClone(params);
Hashtable parameters = PubnubUtil.hashtableClone(params);

String signature = "0";

Expand Down
18 changes: 2 additions & 16 deletions java/srcPubnubApi/com/pubnub/api/PubnubCore.java
Original file line number Diff line number Diff line change
Expand Up @@ -146,20 +146,6 @@ public boolean getCacheBusting() {
return this.CACHE_BUSTING;
}

protected Hashtable hashtableClone(Hashtable ht) {
if (ht == null)
return null;

Hashtable htresp = new Hashtable();
Enumeration e = ht.keys();

while (e.hasMoreElements()) {
Object element = e.nextElement();
htresp.put(element, ht.get(element));
}
return htresp;
}

/**
* This method returns all channel names currently subscribed to in form of
* a comma separated String
Expand Down Expand Up @@ -747,7 +733,7 @@ public void handleError(HttpRequest hreq, PubnubError error) {
*/
public void detailedHistory(final String channel, long start, long end,
int count, boolean reverse, final Callback callback) {
Hashtable parameters = hashtableClone(params);
Hashtable parameters = PubnubUtil.hashtableClone(params);
if (count == -1)
count = 100;

Expand Down Expand Up @@ -1288,7 +1274,7 @@ private void _subscribe_base(boolean fresh, boolean dar, Worker worker) {
};


Hashtable params = hashtableClone(this.params);
Hashtable params = PubnubUtil.hashtableClone(this.params);
params.put("uuid", UUID);
log.verbose("Subscribing with timetoken : " + _timetoken);

Expand Down
Loading

0 comments on commit 97843b8

Please sign in to comment.