mirror of https://gitee.com/openkylin/bsh.git
update version info.
This commit is contained in:
parent
9bf988fe84
commit
7eb26cb11b
12
build.xml
12
build.xml
|
@ -54,10 +54,10 @@
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<!-- Uncomment to build without making the BSF adapter
|
<!-- Uncomment to build without making the BSF adapter
|
||||||
-->
|
|
||||||
<property name="exclude-bsf"
|
<property name="exclude-bsf"
|
||||||
value="bsh/util/BeanShellBSFEngine.java,TestBshBSF.java"/>
|
value="bsh/util/BeanShellBSFEngine.java,TestBshBSF.java"/>
|
||||||
|
-->
|
||||||
<!-- Uncomment to build without the ASM class generator code.
|
<!-- Uncomment to build without the ASM class generator code.
|
||||||
<property name="exclude-classgen"
|
<property name="exclude-classgen"
|
||||||
value="bsh/org/objectweb/asm/**,bsh/ClassGeneratorImpl.java,bsh/ClassGeneratorUtil.java,bsh/DelayedEvalBshMethod.java"/>
|
value="bsh/org/objectweb/asm/**,bsh/ClassGeneratorImpl.java,bsh/ClassGeneratorUtil.java,bsh/DelayedEvalBshMethod.java"/>
|
||||||
|
@ -159,7 +159,7 @@
|
||||||
optimize="on"
|
optimize="on"
|
||||||
debug="off"
|
debug="off"
|
||||||
includes="**/*.java"
|
includes="**/*.java"
|
||||||
excludes="${excludes},**/bak/**"
|
excludes="${excludes},**/bak/**" target="1.6"
|
||||||
>
|
>
|
||||||
<classpath>
|
<classpath>
|
||||||
<fileset refid="lib-fileset"/>
|
<fileset refid="lib-fileset"/>
|
||||||
|
@ -201,7 +201,11 @@
|
||||||
windowtitle="BeanShell ${version}"
|
windowtitle="BeanShell ${version}"
|
||||||
doctitle="<h1>BeanShell ${version}<h1>"
|
doctitle="<h1>BeanShell ${version}<h1>"
|
||||||
bottom="<em>© 2000-2005 pat@pat.net :-)</em>"
|
bottom="<em>© 2000-2005 pat@pat.net :-)</em>"
|
||||||
/>
|
>
|
||||||
|
<link href="/usr/share/doc/default-jdk-doc/api/" />
|
||||||
|
<link href="/usr/share/doc/libbsf-java/api/" />
|
||||||
|
<link href="/usr/share/doc/libservlet3.0-java/api/" />
|
||||||
|
</javadoc>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<!-- Jar target setup -->
|
<!-- Jar target setup -->
|
||||||
|
|
|
@ -1,3 +1,9 @@
|
||||||
|
bsh (2.0b4-ok1.2) nile; urgency=medium
|
||||||
|
|
||||||
|
* update version info.
|
||||||
|
|
||||||
|
-- rtlhq <nobelxyz@163.com> Mon, 16 Oct 2023 13:07:39 +0800
|
||||||
|
|
||||||
bsh (2.0b4-ok1.1) nile; urgency=medium
|
bsh (2.0b4-ok1.1) nile; urgency=medium
|
||||||
|
|
||||||
* Build for openkylin.
|
* Build for openkylin.
|
||||||
|
|
|
@ -1,18 +0,0 @@
|
||||||
Description: Build without the BSF adapter.
|
|
||||||
Author: Wolfgang Baer <WBaer@gmx.de>
|
|
||||||
|
|
||||||
--- bsh~/build.xml 2005-08-08 19:56:01.000000000 +0200
|
|
||||||
+++ bsh/build.xml 2005-08-06 21:16:21.000000000 +0200
|
|
||||||
@@ -54,10 +54,10 @@
|
|
||||||
-->
|
|
||||||
|
|
||||||
<!-- Uncomment to build without making the BSF adapter
|
|
||||||
- -->
|
|
||||||
+
|
|
||||||
<property name="exclude-bsf"
|
|
||||||
value="bsh/util/BeanShellBSFEngine.java,TestBshBSF.java"/>
|
|
||||||
-
|
|
||||||
+ -->
|
|
||||||
<!-- Uncomment to build without the ASM class generator code.
|
|
||||||
<property name="exclude-classgen"
|
|
||||||
value="bsh/org/objectweb/asm/**,bsh/ClassGeneratorImpl.java,bsh/ClassGeneratorUtil.java,bsh/DelayedEvalBshMethod.java"/>
|
|
|
@ -1,49 +0,0 @@
|
||||||
Description: Insert a work around for GNU JVMs to use an AWT based GUI instead
|
|
||||||
of swing.
|
|
||||||
Author: Wolfgang Baer <WBaer@gmx.de>
|
|
||||||
|
|
||||||
--- bsh~/src/bsh/Console.java 2003-08-29 17:11:14.000000000 +0200
|
|
||||||
+++ bsh/src/bsh/Console.java 2005-02-22 23:20:35.422962248 +0100
|
|
||||||
@@ -35,6 +35,7 @@
|
|
||||||
package bsh;
|
|
||||||
|
|
||||||
import bsh.util.*;
|
|
||||||
+import java.util.Properties;
|
|
||||||
|
|
||||||
/**
|
|
||||||
Console startup class.
|
|
||||||
@@ -47,18 +48,25 @@
|
|
||||||
System.out.println("Can't find the BeanShell utilities...");
|
|
||||||
|
|
||||||
if ( Capabilities.haveSwing() )
|
|
||||||
- {
|
|
||||||
- bsh.util.Util.startSplashScreen();
|
|
||||||
- try {
|
|
||||||
- new Interpreter().eval("desktop()");
|
|
||||||
- } catch ( EvalError e ) {
|
|
||||||
- System.err.println("Couldn't start desktop: "+e);
|
|
||||||
+ {
|
|
||||||
+
|
|
||||||
+ // Test if gnu classpath vm
|
|
||||||
+ Properties props = System.getProperties();
|
|
||||||
+ if(props.getProperty("gnu.classpath.version") == null) { // ok sun vm
|
|
||||||
+
|
|
||||||
+ bsh.util.Util.startSplashScreen();
|
|
||||||
+ try {
|
|
||||||
+ new Interpreter().eval("desktop()");
|
|
||||||
+ } catch ( EvalError e ) {
|
|
||||||
+ System.err.println("Couldn't start desktop: "+e);
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ else { // gnu classpath derived vm
|
|
||||||
+ AWTConsole.main( args );
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
System.err.println(
|
|
||||||
- "Can't find javax.swing package: "
|
|
||||||
- +" An AWT based Console is available but not built by default.");
|
|
||||||
- //AWTConsole.main( args );
|
|
||||||
+ "Can't find javax.swing package ! ");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,14 +0,0 @@
|
||||||
Description: Compile 1.3 java code.
|
|
||||||
Author: Wolfgang Baer <WBaer@gmx.de>
|
|
||||||
|
|
||||||
--- bsh~/build.xml 2005-08-08 20:13:21.000000000 +0200
|
|
||||||
+++ bsh/build.xml 2005-08-08 20:21:33.000000000 +0200
|
|
||||||
@@ -159,7 +159,7 @@
|
|
||||||
optimize="on"
|
|
||||||
debug="off"
|
|
||||||
includes="**/*.java"
|
|
||||||
- excludes="${excludes},**/bak/**"
|
|
||||||
+ excludes="${excludes},**/bak/**" target="1.6"
|
|
||||||
>
|
|
||||||
<classpath>
|
|
||||||
<fileset refid="lib-fileset"/>
|
|
|
@ -1,14 +0,0 @@
|
||||||
Description: Fixes a typo.
|
|
||||||
Author: Niels Thykier <niels@thykier.net>
|
|
||||||
|
|
||||||
--- a/src/bsh/BshClassManager.java 2010-11-21 19:59:08.597086821 +0100
|
|
||||||
+++ b/src/bsh/BshClassManager.java 2010-11-21 20:01:06.128078201 +0100
|
|
||||||
@@ -493,7 +493,7 @@
|
|
||||||
if ( cur != null )
|
|
||||||
throw new InterpreterError("Defining class problem: "+className
|
|
||||||
+": BeanShell cannot yet simultaneously define two or more "
|
|
||||||
- +"dependant classes of the same name. Attempt to define: "
|
|
||||||
+ +"dependent classes of the same name. Attempt to define: "
|
|
||||||
+ className +" while defining: "+cur
|
|
||||||
);
|
|
||||||
definingClasses.put( className, NOVALUE );
|
|
|
@ -1,18 +0,0 @@
|
||||||
Description: Link the Javadoc against system installed javadocs.
|
|
||||||
Author: Niels Thykier <niels@thykier.net>
|
|
||||||
|
|
||||||
--- a/build.xml 2010-11-21 20:16:20.000000000 +0100
|
|
||||||
+++ b/build.xml 2010-11-21 20:24:15.544531250 +0100
|
|
||||||
@@ -201,7 +201,11 @@
|
|
||||||
windowtitle="BeanShell ${version}"
|
|
||||||
doctitle="<h1>BeanShell ${version}<h1>"
|
|
||||||
bottom="<em>© 2000-2005 pat@pat.net :-)</em>"
|
|
||||||
- />
|
|
||||||
+ >
|
|
||||||
+ <link href="/usr/share/doc/default-jdk-doc/api/" />
|
|
||||||
+ <link href="/usr/share/doc/libbsf-java/api/" />
|
|
||||||
+ <link href="/usr/share/doc/libservlet3.0-java/api/" />
|
|
||||||
+ </javadoc>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<!-- Jar target setup -->
|
|
|
@ -1,14 +0,0 @@
|
||||||
Description: Fixes the build failure with Java 9
|
|
||||||
Author: Emmanuel Bourg <ebourg@apache.org>
|
|
||||||
Forwarded: no
|
|
||||||
--- a/src/bsh/util/AWTConsole.java
|
|
||||||
+++ b/src/bsh/util/AWTConsole.java
|
|
||||||
@@ -220,8 +220,6 @@
|
|
||||||
Great. What a piece of crap.
|
|
||||||
*/
|
|
||||||
public void setCaretPosition( int pos ) {
|
|
||||||
- ((java.awt.peer.TextComponentPeer)getPeer()).setCaretPosition(
|
|
||||||
- pos + countNLs() );
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
|
@ -1,44 +0,0 @@
|
||||||
From: Markus Koschany <apo@debian.org>
|
|
||||||
Date: Fri, 26 Feb 2016 14:24:31 +0100
|
|
||||||
Subject: CVE-2016-2510
|
|
||||||
|
|
||||||
An application that includes BeanShell on the classpath may be vulnerable if
|
|
||||||
another part of the application uses Java serialization or XStream to
|
|
||||||
deserialize data from an untrusted source.
|
|
||||||
|
|
||||||
A vulnerable application could be exploited for remote code execution,
|
|
||||||
including executing arbitrary shell commands.
|
|
||||||
|
|
||||||
https://github.com/beanshell/beanshell/commit/7c68fde2d6fc65e362f20863d868c112a90a9b49
|
|
||||||
https://github.com/beanshell/beanshell/commit/1ccc66bb693d4e46a34a904db8eeff07808d2ced
|
|
||||||
---
|
|
||||||
src/bsh/XThis.java | 8 ++++++--
|
|
||||||
1 file changed, 6 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/bsh/XThis.java b/src/bsh/XThis.java
|
|
||||||
index 3f05974..94bcc22 100644
|
|
||||||
--- a/src/bsh/XThis.java
|
|
||||||
+++ b/src/bsh/XThis.java
|
|
||||||
@@ -65,7 +65,7 @@ public class XThis extends This
|
|
||||||
*/
|
|
||||||
Hashtable interfaces;
|
|
||||||
|
|
||||||
- InvocationHandler invocationHandler = new Handler();
|
|
||||||
+ transient InvocationHandler invocationHandler = new Handler();
|
|
||||||
|
|
||||||
public XThis( NameSpace namespace, Interpreter declaringInterp ) {
|
|
||||||
super( namespace, declaringInterp );
|
|
||||||
@@ -122,8 +122,12 @@ public class XThis extends This
|
|
||||||
classes aren't there (doesn't it?) This class shouldn't be loaded
|
|
||||||
if an XThis isn't instantiated in NameSpace.java, should it?
|
|
||||||
*/
|
|
||||||
- class Handler implements InvocationHandler, java.io.Serializable
|
|
||||||
+ class Handler implements InvocationHandler
|
|
||||||
{
|
|
||||||
+ private Object readResolve() throws java.io.ObjectStreamException {
|
|
||||||
+ throw new java.io.NotSerializableException();
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
public Object invoke( Object proxy, Method method, Object[] args )
|
|
||||||
throws Throwable
|
|
||||||
{
|
|
|
@ -1,6 +0,0 @@
|
||||||
01_EnableBsfAdapter_buildXml.patch
|
|
||||||
02_GNUvms_workaround.patch
|
|
||||||
04_fix_typo.patch
|
|
||||||
05_link_javadoc.patch
|
|
||||||
CVE-2016-2510.patch
|
|
||||||
07_java9_compatibility.patch
|
|
|
@ -1 +1 @@
|
||||||
3.0 (quilt)
|
3.0 (native)
|
||||||
|
|
|
@ -493,7 +493,7 @@ public class BshClassManager
|
||||||
if ( cur != null )
|
if ( cur != null )
|
||||||
throw new InterpreterError("Defining class problem: "+className
|
throw new InterpreterError("Defining class problem: "+className
|
||||||
+": BeanShell cannot yet simultaneously define two or more "
|
+": BeanShell cannot yet simultaneously define two or more "
|
||||||
+"dependant classes of the same name. Attempt to define: "
|
+"dependent classes of the same name. Attempt to define: "
|
||||||
+ className +" while defining: "+cur
|
+ className +" while defining: "+cur
|
||||||
);
|
);
|
||||||
definingClasses.put( className, NOVALUE );
|
definingClasses.put( className, NOVALUE );
|
||||||
|
|
|
@ -35,6 +35,7 @@
|
||||||
package bsh;
|
package bsh;
|
||||||
|
|
||||||
import bsh.util.*;
|
import bsh.util.*;
|
||||||
|
import java.util.Properties;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Console startup class.
|
Console startup class.
|
||||||
|
@ -48,17 +49,24 @@ public class Console
|
||||||
|
|
||||||
if ( Capabilities.haveSwing() )
|
if ( Capabilities.haveSwing() )
|
||||||
{
|
{
|
||||||
|
|
||||||
|
// Test if gnu classpath vm
|
||||||
|
Properties props = System.getProperties();
|
||||||
|
if(props.getProperty("gnu.classpath.version") == null) { // ok sun vm
|
||||||
|
|
||||||
bsh.util.Util.startSplashScreen();
|
bsh.util.Util.startSplashScreen();
|
||||||
try {
|
try {
|
||||||
new Interpreter().eval("desktop()");
|
new Interpreter().eval("desktop()");
|
||||||
} catch ( EvalError e ) {
|
} catch ( EvalError e ) {
|
||||||
System.err.println("Couldn't start desktop: "+e);
|
System.err.println("Couldn't start desktop: "+e);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else { // gnu classpath derived vm
|
||||||
|
AWTConsole.main( args );
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
System.err.println(
|
System.err.println(
|
||||||
"Can't find javax.swing package: "
|
"Can't find javax.swing package ! ");
|
||||||
+" An AWT based Console is available but not built by default.");
|
|
||||||
//AWTConsole.main( args );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,7 +65,7 @@ public class XThis extends This
|
||||||
*/
|
*/
|
||||||
Hashtable interfaces;
|
Hashtable interfaces;
|
||||||
|
|
||||||
InvocationHandler invocationHandler = new Handler();
|
transient InvocationHandler invocationHandler = new Handler();
|
||||||
|
|
||||||
public XThis( NameSpace namespace, Interpreter declaringInterp ) {
|
public XThis( NameSpace namespace, Interpreter declaringInterp ) {
|
||||||
super( namespace, declaringInterp );
|
super( namespace, declaringInterp );
|
||||||
|
@ -122,8 +122,12 @@ public class XThis extends This
|
||||||
classes aren't there (doesn't it?) This class shouldn't be loaded
|
classes aren't there (doesn't it?) This class shouldn't be loaded
|
||||||
if an XThis isn't instantiated in NameSpace.java, should it?
|
if an XThis isn't instantiated in NameSpace.java, should it?
|
||||||
*/
|
*/
|
||||||
class Handler implements InvocationHandler, java.io.Serializable
|
class Handler implements InvocationHandler
|
||||||
{
|
{
|
||||||
|
private Object readResolve() throws java.io.ObjectStreamException {
|
||||||
|
throw new java.io.NotSerializableException();
|
||||||
|
}
|
||||||
|
|
||||||
public Object invoke( Object proxy, Method method, Object[] args )
|
public Object invoke( Object proxy, Method method, Object[] args )
|
||||||
throws Throwable
|
throws Throwable
|
||||||
{
|
{
|
||||||
|
|
|
@ -220,8 +220,6 @@ public class AWTConsole extends TextArea
|
||||||
Great. What a piece of crap.
|
Great. What a piece of crap.
|
||||||
*/
|
*/
|
||||||
public void setCaretPosition( int pos ) {
|
public void setCaretPosition( int pos ) {
|
||||||
((java.awt.peer.TextComponentPeer)getPeer()).setCaretPosition(
|
|
||||||
pos + countNLs() );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue