• UniversalXPConnect privileges denied

  • OpenKM has many interesting features, but requires some configuration process to show its full potential.
OpenKM has many interesting features, but requires some configuration process to show its full potential.
Forum rules: Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
 #1659  by david
 
I receive this error message when I\'m trying to copy to clipboard a document url:

Error: A un script de \"http://localhost:8080\" se le han denegado los privilegios UniversalXPConnect.

Freestyle translation:

Error: An script from \"http://localhost:8080\" has been denied the UniversalXPConnect privileges.

What can be causing this?

Thanks in advance,
David
 #1663  by jllort
 
Do you have any plugin on firefox ( popup killer, add killer or similar ), it could be some antivirus for example that disables javascript script because interprets as a malicius code.

Normally these are the causes that some program - for protecction purposes - blocks RPC javascript calls.
 #1680  by pavila
 
To enable javascript Copy to Clipboard buttons on Firefox and Mozilla, enter the following line into browser address bar: \"about:config\"

The list of preferences should open in browser window. Click right mouse button somewhere in active part of preference list window and choose New > Boolean option from context menu. Paste the following Preference name into the New boolean value window input box: \"signed.applets.codebase_principal_support\"
 #2560  by softashu
 
Hi Every one ...

Please help me to solve our problem ..

we are trying to Bookmark our page through \"Bookmark\" link provided on our page ,
for that We have signed that page with script buy NSS \"signtool\" and all certificate and files packed in a Jar file.

It working nice in Local machine . But it not working on web or End User so please give me Solution for enabling that script on web also ..

Below The script we try to use..

function addBookmark()
{
//${pageContext.request.requestURL} var urltest=url.value;
if (navigator.userAgent.indexOf(\'Gecko\') == -1)
{

alert(\"You are in IE Browser \");
var boll =\"${pageContext.request.requestURL}\";
window.external.AddFavorite(boll,\'community forums\');
alert(\"You added \");

}

else
{
netscape.security.PrivilegeManager.enablePrivilege(\"UniversalXPConnect\");
var bmsvc = Components.classes[\"@mozilla.org/browser/nav-bookmarks-service;1\"]
.getService(Components.interfaces.nsINavBookmarksService);
var ios = Components.classes[\"@mozilla.org/network/io-service;1\"]
.getService(Components.interfaces.nsIIOService);
alert(\"You have granted privelaged from Mozilla Authority\");
//var uri = ios.newURI(\"http://www.example.org/\", null, null);
var uri = ios.newURI(\"http://www.example.org/\", null, null);
var newBkmkId = bmsvc.insertBookmark(bmsvc.bookmarksMenuFolder, uri, bmsvc.DEFAULT_INDEX, \"example.org\");
}
}



Please reply me we are in trouble

Regards

Ashutosh Kumar
9324177101
 #2563  by jllort
 
Our actual copy function is:
Code: Select all
function copyToClipboard(text) {
			var ua = navigator.userAgent.toLowerCase();
		   	if (ua.indexOf(\'msie\') != -1 ) {
		   		// the IE-way
		   		window.clipboardData.setData(\"Text\", text);
		   
		   		// Probabely not the best way to detect netscape/mozilla.
		   		// I am unsure from what version this is supported
		   	} else if (ua.indexOf(\'gecko\') != -1 ) {
		   		try {
					netscape.security.PrivilegeManager.enablePrivilege(\'UniversalXPConnect\');
					const gClipboardHelper = Components.classes[\"@mozilla.org/widget/clipboardhelper;1\"].getService(Components.interfaces.nsIClipboardHelper);
					gClipboardHelper.copyString(text);
				} catch (e) {
                    alert(e);
                }
			}
		   
		   	return false;
	   	}
You can take a look at our index.html page at sourceforge.

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.