securityexception

Javascript SecurityError: DOM Exception 18 while accessing cookies

女生的网名这么多〃 提交于 2019-12-11 10:45:46
问题 Folks, I am working on WebOS Application for LGTV. In previous version my code was working fine while accessing cookie, but with updated WebOS it is giving me error as following: Can anyone help me over it? Thanks EDIT Here is the output when I try to access cookie in JS Console: 回答1: I see you are loading the app via file:// for testing. Cookies don't work for file:// urls. See this StackOverflow answer: Uncaught Error: SECURITY_ERR: DOM Exception 18 when I try to set a cookie 来源: https:/

PickContact requires android.permission.READ_CONTACTS, or grantUriPermission()

家住魔仙堡 提交于 2019-12-11 09:59:25
问题 Some info first: I first created the app in Cordova: see Cordova permissions requires android.permission.READ_CONTACTS, or grantUriPermission() Now i created the app as a native Android app using Android Studio Builder, it has the same error. I'm using Android 6.0 ( SDK 23) According to the docs, ContactPick doesn't need permissions: http://developer.android.com/guide/components/intents-common.html#Contacts The result Intent delivered to your onActivityResult() callback contains the content:

How can I check if startActivity() will fail with SecurityException due to lack of permission?

浪子不回头ぞ 提交于 2019-12-10 21:44:13
问题 I want to support adding Contacts with the Contact Picker. It appears that the READ_CONTACTS permission is required in certain phones and not others - see Do contact picker queries require the read_contacts permission depending on the android version? Intent intent = new Intent(Intent.ACTION_PICK, People.CONTENT_URI); startActivityForResult(intent, CHOOSE_CONTACT); The exception occurs in onActivityResult() when I query the returned data (mangedQUery()) if (resultCode == Activity.RESULT_OK) {

Impersonation in .Net crashes when reading registry keys (LinkLabel SecurityException)

ⅰ亾dé卋堺 提交于 2019-12-10 16:28:20
问题 My app needs to impersonate a service account, which I do through a native-call to LogonUser . However, it appears that random components in the .Net library try to access registry keys the account doesn't have access to, causing a SecurityException to be thrown. Specifically, when I load a LinkLabel , it crashes trying to determine the default hyperlink color in IE: System.Security.SecurityException: Requested registry access is not allowed. at System.ThrowHelper.ThrowSecurityException

Android reading external storage gives securityException

隐身守侯 提交于 2019-12-10 13:05:50
问题 I am trying to get the music files in the device. here is what i do: public ArrayList<Track> getAllSongsFromSDCARD() { allTracks = new ArrayList<Track>(); String[] STAR = { "*" }; Uri allsongsuri = MediaStore.Audio.Media.EXTERNAL_CONTENT_URI; String selection = MediaStore.Audio.Media.IS_MUSIC + " != 0"; Cursor cursor = mContext.getApplicationContext().getContentResolver().query(allsongsuri, STAR, selection, null, null); if (cursor != null) { if (cursor.moveToFirst()) { do { String song_name =

UnauthorizedAccessException vs SecurityException

非 Y 不嫁゛ 提交于 2019-12-09 07:46:52
问题 The MSDN constructor for a FileStream says that it may throw either an UnauthorizedAccessException or a SecurityException. Here's what MSDN says about these exceptions. UnauthorizedAccessException: The exception that is thrown when the operating system denies access because of an I/O error or a specific type of security error. SecurityException: The exception that is thrown when a security error is detected. How are these two similar exceptions different? What situations will trigger either

Programmatically install an apk in Android 7 / api24

♀尐吖头ヾ 提交于 2019-12-09 05:26:08
问题 I am trying to get my app to automatically install an apk. This works fine for api<24. But for 24, it is failing. Android has implemented extra security: For apps targeting Android 7.0, the Android framework enforces the StrictMode API policy that prohibits exposing file:// URIs outside your app. If an intent containing a file URI leaves your app, the app fails with a FileUriExposedException exception. So I tried this: Uri myuri; if (Build.VERSION.SDK_INT < Build.VERSION_CODES.N){ myuri = Uri

Some users gets Security Exception: Attempted to to open a sandboxed jar as a Trusted-Library

本秂侑毒 提交于 2019-12-08 00:21:46
问题 We use applet on our application login page. Applet contains 2 classes. Jar is signed (ca certificate). Manifest file contains: "Trusted-Library: true. It works for most of the users but some of them have problems with applet because JVM report Security Exception: Attempted to to open a sandboxed jar as a Trusted-Library. Have you any idea why it wont work for them? For exaple User1 has Java Plug-in 10.21.2.11 JRE version 1.7.0_21-b11 Java HotSpot(TM) Client VM. He try Firefox 21 and IE 8.0

Delete SUN_MICR.RSA, SUN_MICR.SF solves manifest signature file entry problem

左心房为你撑大大i 提交于 2019-12-07 18:19:35
问题 When I tried repacking all the jars into one jar, and run that one big jar, I got following exception java.lang.SecurityException: no manifiest section for signature file entry javax/activation/MimeType.class After googling I found a working solution at http://www.coderanch.com/t/133070/Security/Jar-File-java-lang-SecurityException The solution is delete SUN_MICR.RSA and SUN_MICR.SF files from the META-INF folder in the jar. It worked. I tried to find out how does this solution work? . But

Signed Java Applet Throws Security Exception on Connect to a Webservice

橙三吉。 提交于 2019-12-07 05:01:26
I have an java applet running on tomcat 5.5. It is signed ( -selfcert). I still get an java.security.AccessControlException: access denied (java.lang.RuntimePermission createClassLoader) Exception, when my Applet tries to connect to a webservice (already in this line): ws_locator = new My_WebserviceLocator(ws_adress + "?wsdl", new javax.xml.namespace.QName("http://impl.webservice", "My_Webservice")); Since there are some similar questions here, an i read them: Yes, the applet is signed. I checked it with -verify. Tomcat security exception, may be, but i have added to catalina.policy: grant