Comments (3)
That is indeed what I meant, now the operation gets blocked, so we are one step further.
The line in your code:
if(validStack() || validRequest(c)) {
Should avoid the block, so we might have to debug where the problem is coming from, as this operation should be allowed (for scripts)
from parabot.
Method getResource(Ljava/lang/Class;Ljava/lang/String;)Ljava/net/URL
needs to be added to ClassRedirect.
from parabot.
Not sure what security you want to put on it, but doing this:
public static URL getResource(Class<?> c, String path) {
if(validStack() || validRequest(c)) {
return c.getResource(path);
}
System.err.println(c.getName() + "#getResource(" + path + ") Blocked.");
throw RedirectClassAdapter.createSecurityException();
}
would still not allow user created classes to use the function and still throw a SecurityException:
org.parabot.atex.oswar.afisher.ui.GuiApp_parabot#getResource(/fxml/gui.fxml) Blocked.
java.lang.SecurityException: Unsafe operation blocked. Op:getResource
at org.parabot.core.asm.RedirectClassAdapter.createSecurityException(RedirectClassAdapter.java:62)
at org.parabot.core.asm.redirect.ClassRedirect.getResource(ClassRedirect.java:68)
at org.parabot.atex.oswar.afisher.ui.GuiApp_parabot.start(GuiApp_parabot.java:25)
at org.parabot.atex.oswar.afisher.ui.GuiApp_parabot$1.run(GuiApp_parabot.java:45)
at com.sun.javafx.application.PlatformImpl.lambda$null$172(PlatformImpl.java:295)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$173(PlatformImpl.java:294)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
from parabot.
Related Issues (20)
- BDN Server config update/other misc HOT 1
- Store proxy configuration
- Bump version to v2.7
- Automatic system to update the version
- Custom action for randoms HOT 1
- Fix donator & sponsor status HOT 2
- Warn for JRE > 1.8 and 32 bits HOT 1
- See if JRE 1.9+ would work with V2 HOT 2
- Dump of all information during randoms HOT 1
- Look into exception logging
- Poll system for upcoming features or changes
- Prepare version 2.8
- Support Java 9+ HOT 1
- ReflectUI null pointer
- Confirm exit on close
- Catch-all exceptions
- Implement server provider proxy creator
- Linux Bot Dialog issues HOT 3
- What is the outlook for parabot? HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from parabot.