You are viewing a plain text version of this content. The canonical link for it is here.
Posted to adffaces-issues@incubator.apache.org by "Matt Cooper (JIRA)" <ad...@incubator.apache.org> on 2006/12/05 17:30:21 UTC
[jira] Created: (ADFFACES-320) Obfuscation of addition statement
where one of the items being added is an increment statement
Obfuscation of addition statement where one of the items being added is an increment statement
----------------------------------------------------------------------------------------------
Key: ADFFACES-320
URL: http://issues.apache.org/jira/browse/ADFFACES-320
Project: MyFaces ADF-Faces
Issue Type: Bug
Components: Build
Environment: maven-javascript-plugin
Reporter: Matt Cooper
Priority: Minor
If you have JavaScript code like the following:
var x = 1;
var y = "" + ++x;
It is a legal operation. However, if this code is run through the maven-javascript-plugin, the second line becomes something like this:
var y=""+++x;
This yields an invalid increment operand. Instead, the space between the "+" and the "++" must be preserved. I also suspect (but have not tested) this may be a problem with this code too:
var a = 1;
var b = a++ + "";
I suspect the increment and the decrement tokens in the obfuscater just need to be tagged as space sensitive (both before and after)--so we don't remove the spaces when compacting the code.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (ADFFACES-320) Obfuscation of addition statement
where one of the items being added is an increment statement
Posted by "Kamran Kashanian (JIRA)" <ad...@incubator.apache.org>.
[ http://issues.apache.org/jira/browse/ADFFACES-320?page=all ]
Kamran Kashanian updated ADFFACES-320:
--------------------------------------
Attachment: obfuscator.plugin2.patch
This patch implements a less conservative approach to stripping whitespaces than the previous patch. While the previous patch left a single whitespace character around *every* JS token in the file, this patch restricts this to "unary" operators. In the grammar file unary operators include the following: delete, void, typeof, ++, --, +, -, ~, and !.
> Obfuscation of addition statement where one of the items being added is an increment statement
> ----------------------------------------------------------------------------------------------
>
> Key: ADFFACES-320
> URL: http://issues.apache.org/jira/browse/ADFFACES-320
> Project: MyFaces ADF-Faces
> Issue Type: Bug
> Components: Build
> Environment: maven-javascript-plugin
> Reporter: Matt Cooper
> Priority: Minor
> Attachments: obfuscator.plugin.patch, obfuscator.plugin2.patch
>
>
> If you have JavaScript code like the following:
> var x = 1;
> var y = "" + ++x;
> It is a legal operation. However, if this code is run through the maven-javascript-plugin, the second line becomes something like this:
> var y=""+++x;
> This yields an invalid increment operand. Instead, the space between the "+" and the "++" must be preserved. I also suspect (but have not tested) this may be a problem with this code too:
> var a = 1;
> var b = a++ + "";
> I suspect the increment and the decrement tokens in the obfuscater just need to be tagged as space sensitive (both before and after)--so we don't remove the spaces when compacting the code.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (ADFFACES-320) Obfuscation of addition statement
where one of the items being added is an increment statement
Posted by "Matthias Weßendorf (JIRA)" <ad...@incubator.apache.org>.
[ https://issues.apache.org/jira/browse/ADFFACES-320?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Matthias Weßendorf updated ADFFACES-320:
----------------------------------------
Fix Version/s: 1.0.0-incubating-plugins
Affects Version/s: 1.0.0-incubating-plugins
> Obfuscation of addition statement where one of the items being added is an increment statement
> ----------------------------------------------------------------------------------------------
>
> Key: ADFFACES-320
> URL: https://issues.apache.org/jira/browse/ADFFACES-320
> Project: MyFaces ADF-Faces
> Issue Type: Bug
> Components: Build
> Affects Versions: 1.0.0-incubating-plugins
> Environment: maven-javascript-plugin
> Reporter: Matt Cooper
> Assigned To: Adam Winer
> Priority: Minor
> Fix For: 1.0.0-incubating-plugins
>
> Attachments: obfuscator.plugin.patch, obfuscator.plugin2.patch
>
>
> If you have JavaScript code like the following:
> var x = 1;
> var y = "" + ++x;
> It is a legal operation. However, if this code is run through the maven-javascript-plugin, the second line becomes something like this:
> var y=""+++x;
> This yields an invalid increment operand. Instead, the space between the "+" and the "++" must be preserved. I also suspect (but have not tested) this may be a problem with this code too:
> var a = 1;
> var b = a++ + "";
> I suspect the increment and the decrement tokens in the obfuscater just need to be tagged as space sensitive (both before and after)--so we don't remove the spaces when compacting the code.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (ADFFACES-320) Obfuscation of addition statement
where one of the items being added is an increment statement
Posted by "Adam Winer (JIRA)" <ad...@incubator.apache.org>.
[ http://issues.apache.org/jira/browse/ADFFACES-320?page=all ]
Adam Winer updated ADFFACES-320:
--------------------------------
Status: Resolved (was: Patch Available)
Resolution: Fixed
Checked in second patch.
> Obfuscation of addition statement where one of the items being added is an increment statement
> ----------------------------------------------------------------------------------------------
>
> Key: ADFFACES-320
> URL: http://issues.apache.org/jira/browse/ADFFACES-320
> Project: MyFaces ADF-Faces
> Issue Type: Bug
> Components: Build
> Environment: maven-javascript-plugin
> Reporter: Matt Cooper
> Priority: Minor
> Attachments: obfuscator.plugin.patch, obfuscator.plugin2.patch
>
>
> If you have JavaScript code like the following:
> var x = 1;
> var y = "" + ++x;
> It is a legal operation. However, if this code is run through the maven-javascript-plugin, the second line becomes something like this:
> var y=""+++x;
> This yields an invalid increment operand. Instead, the space between the "+" and the "++" must be preserved. I also suspect (but have not tested) this may be a problem with this code too:
> var a = 1;
> var b = a++ + "";
> I suspect the increment and the decrement tokens in the obfuscater just need to be tagged as space sensitive (both before and after)--so we don't remove the spaces when compacting the code.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (ADFFACES-320) Obfuscation of addition statement
where one of the items being added is an increment statement
Posted by "Kamran Kashanian (JIRA)" <ad...@incubator.apache.org>.
[ http://issues.apache.org/jira/browse/ADFFACES-320?page=all ]
Kamran Kashanian updated ADFFACES-320:
--------------------------------------
Status: Patch Available (was: Open)
> Obfuscation of addition statement where one of the items being added is an increment statement
> ----------------------------------------------------------------------------------------------
>
> Key: ADFFACES-320
> URL: http://issues.apache.org/jira/browse/ADFFACES-320
> Project: MyFaces ADF-Faces
> Issue Type: Bug
> Components: Build
> Environment: maven-javascript-plugin
> Reporter: Matt Cooper
> Priority: Minor
>
> If you have JavaScript code like the following:
> var x = 1;
> var y = "" + ++x;
> It is a legal operation. However, if this code is run through the maven-javascript-plugin, the second line becomes something like this:
> var y=""+++x;
> This yields an invalid increment operand. Instead, the space between the "+" and the "++" must be preserved. I also suspect (but have not tested) this may be a problem with this code too:
> var a = 1;
> var b = a++ + "";
> I suspect the increment and the decrement tokens in the obfuscater just need to be tagged as space sensitive (both before and after)--so we don't remove the spaces when compacting the code.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Assigned: (ADFFACES-320) Obfuscation of addition statement
where one of the items being added is an increment statement
Posted by "Matthias Weßendorf (JIRA)" <ad...@incubator.apache.org>.
[ https://issues.apache.org/jira/browse/ADFFACES-320?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Matthias Weßendorf reassigned ADFFACES-320:
-------------------------------------------
Assignee: Adam Winer
> Obfuscation of addition statement where one of the items being added is an increment statement
> ----------------------------------------------------------------------------------------------
>
> Key: ADFFACES-320
> URL: https://issues.apache.org/jira/browse/ADFFACES-320
> Project: MyFaces ADF-Faces
> Issue Type: Bug
> Components: Build
> Environment: maven-javascript-plugin
> Reporter: Matt Cooper
> Assigned To: Adam Winer
> Priority: Minor
> Attachments: obfuscator.plugin.patch, obfuscator.plugin2.patch
>
>
> If you have JavaScript code like the following:
> var x = 1;
> var y = "" + ++x;
> It is a legal operation. However, if this code is run through the maven-javascript-plugin, the second line becomes something like this:
> var y=""+++x;
> This yields an invalid increment operand. Instead, the space between the "+" and the "++" must be preserved. I also suspect (but have not tested) this may be a problem with this code too:
> var a = 1;
> var b = a++ + "";
> I suspect the increment and the decrement tokens in the obfuscater just need to be tagged as space sensitive (both before and after)--so we don't remove the spaces when compacting the code.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (ADFFACES-320) Obfuscation of addition statement
where one of the items being added is an increment statement
Posted by "Kamran Kashanian (JIRA)" <ad...@incubator.apache.org>.
[ http://issues.apache.org/jira/browse/ADFFACES-320?page=all ]
Kamran Kashanian updated ADFFACES-320:
--------------------------------------
Attachment: obfuscator.plugin.patch
This patch fixes the stripping of white space characters around the pre/post increment operator. Note that the fix makes the logic for white space stripping extremely conservative. We now leave a single white space character around each token (for tokens that were surrounded by one or more white space characters). The advantage of this is that it prevents errors caused by aggressively stripping white space characters. The disadvantage is that it increases the size of the obfuscated javascript code. In the long run, we need to make this configurable, and I think there is a plan for me to revisit this in the near future.
> Obfuscation of addition statement where one of the items being added is an increment statement
> ----------------------------------------------------------------------------------------------
>
> Key: ADFFACES-320
> URL: http://issues.apache.org/jira/browse/ADFFACES-320
> Project: MyFaces ADF-Faces
> Issue Type: Bug
> Components: Build
> Environment: maven-javascript-plugin
> Reporter: Matt Cooper
> Priority: Minor
> Attachments: obfuscator.plugin.patch
>
>
> If you have JavaScript code like the following:
> var x = 1;
> var y = "" + ++x;
> It is a legal operation. However, if this code is run through the maven-javascript-plugin, the second line becomes something like this:
> var y=""+++x;
> This yields an invalid increment operand. Instead, the space between the "+" and the "++" must be preserved. I also suspect (but have not tested) this may be a problem with this code too:
> var a = 1;
> var b = a++ + "";
> I suspect the increment and the decrement tokens in the obfuscater just need to be tagged as space sensitive (both before and after)--so we don't remove the spaces when compacting the code.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira