robnyman / domassistant

Automatically exported from code.google.com/p/domassistant
1 stars 0 forks source link

Passed parameters not checked before their usage in attrToXpath() #12

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago

To reproduce please see this thread:

http://groups.google.com/group/domassistant/browse_thread/thread/e42cfe90f2b95b9
b

To fix the problem use one of these two syntax in line 222 of
"DOMAssistantComplete-2.7.1.1.js".

   p3 && (p3 = p3.replace(/^["'](.*)["']$/, "$1"));

or:

   if (p3) {
      p3 = p3.replace(/^["'](.*)["']$/, "$1"));
   }

depending on your syntax taste. 

There is no need to check parameter p2 since there is a default case for
it. I am not sure if p1 should be checked too or converted to empty string.
Please review.

--
Diego Perini

Original issue reported on code.google.com by diego.pe...@gmail.com on 19 Jul 2008 at 12:32

GoogleCodeExporter commented 9 years ago
That seems to have solved the problem!

Thanks for your help Diego. The fix will be included in the next release.

Original comment by chengh...@gmail.com on 19 Jul 2008 at 3:39