Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
LinuxSuRen
jenkins
提交
354a0549
J
jenkins
项目概览
LinuxSuRen
/
jenkins
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
J
jenkins
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
354a0549
编写于
1月 23, 2020
作者:
J
Jeff Thompson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Don't use public static boolean property.
上级
b848f853
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
8 addition
and
11 deletion
+8
-11
core/pom.xml
core/pom.xml
+1
-1
core/src/main/java/jenkins/model/Jenkins.java
core/src/main/java/jenkins/model/Jenkins.java
+2
-5
test/src/test/java/jenkins/security/StackTraceSuppressionTest.java
...test/java/jenkins/security/StackTraceSuppressionTest.java
+5
-5
未找到文件。
core/pom.xml
浏览文件 @
354a0549
...
...
@@ -39,7 +39,7 @@ THE SOFTWARE.
<properties>
<staplerFork>
true
</staplerFork>
<stapler.version>
1.259-rc139
3.7b6d39453a92
</stapler.version>
<stapler.version>
1.259-rc139
4.3f695d5ed2a7
</stapler.version>
<spring.version>
2.5.6.SEC03
</spring.version>
<groovy.version>
2.4.12
</groovy.version>
</properties>
...
...
core/src/main/java/jenkins/model/Jenkins.java
浏览文件 @
354a0549
...
...
@@ -5133,10 +5133,10 @@ public class Jenkins extends AbstractCIBase implements DirectlyModifiableTopLeve
}
}
@Restricted
(
Beta
.
class
)
@Restricted
(
NoExternalUse
.
class
)
public
boolean
shouldShowStackTrace
()
{
// Used by oops.jelly
return
SHOW_STACK_TRACE
;
return
Boolean
.
getBoolean
(
Jenkins
.
class
.
getName
()
+
".SHOW_STACK_TRACE"
)
;
}
/**
...
...
@@ -5226,9 +5226,6 @@ public class Jenkins extends AbstractCIBase implements DirectlyModifiableTopLeve
static
final
String
WORKSPACES_DIR_PROP
=
Jenkins
.
class
.
getName
()
+
".workspacesDir"
;
@Restricted
(
Beta
.
class
)
public
static
boolean
SHOW_STACK_TRACE
=
Boolean
.
getBoolean
(
Jenkins
.
class
.
getName
()
+
".SHOW_STACK_TRACE"
);
/**
* Automatically try to launch an agent when Jenkins is initialized or a new agent computer is created.
*/
...
...
test/src/test/java/jenkins/security/StackTraceSuppressionTest.java
浏览文件 @
354a0549
...
...
@@ -50,8 +50,8 @@ public class StackTraceSuppressionTest {
@Before
public
void
setup
()
{
Jenkins
.
SHOW_STACK_TRACE
=
false
;
HttpResponses
.
SHOW_STACK_TRACE
=
false
;
System
.
setProperty
(
"jenkins.model.Jenkins.SHOW_STACK_TRACE"
,
"false"
)
;
System
.
setProperty
(
"org.kohsuke.stapler.HttpResponses.SHOW_STACK_TRACE"
,
"false"
)
;
}
@Test
...
...
@@ -107,7 +107,7 @@ public class StackTraceSuppressionTest {
This test is based upon Stapler throwing an exception for this broken request.
If Stapler is improved to better handle this error, this test may erroneously fail. */
JenkinsRule
.
WebClient
wc
=
j
.
createWebClient
();
HttpResponses
.
SHOW_STACK_TRACE
=
true
;
System
.
setProperty
(
"org.kohsuke.stapler.HttpResponses.SHOW_STACK_TRACE"
,
"true"
)
;
wc
.
setThrowExceptionOnFailingStatusCode
(
false
);
Page
page
=
wc
.
goTo
(
"adjuncts/40331c1bldu3i%3b//'%3b//\"%3b//%25>%3f>uezm3<script>alert(1)</script>foo/org/kohsuke/stapler/jquery/jquery.full.js"
,
"text/plain"
);
...
...
@@ -142,7 +142,7 @@ public class StackTraceSuppressionTest {
If Jenkins is improved to better handle this error, this test may erroneously fail. */
FreeStyleProject
projectError
=
createBrokenProject
();
Jenkins
.
SHOW_STACK_TRACE
=
true
;
System
.
setProperty
(
"jenkins.model.Jenkins.SHOW_STACK_TRACE"
,
"true"
)
;
JenkinsRule
.
WebClient
wc
=
j
.
createWebClient
();
wc
.
setThrowExceptionOnFailingStatusCode
(
false
);
HtmlPage
page
=
wc
.
goTo
(
"job/"
+
projectError
.
getName
()
+
"/configure"
);
...
...
@@ -174,7 +174,7 @@ public class StackTraceSuppressionTest {
public
void
exceptionEndpointShowsTrace
()
throws
Exception
{
/* This test is based upon a testing endpoint that really shouldn't exist in production code.
If Jenkins is improved to eliminate this endpoint, this test may erroneously fail. */
Jenkins
.
SHOW_STACK_TRACE
=
true
;
System
.
setProperty
(
"jenkins.model.Jenkins.SHOW_STACK_TRACE"
,
"true"
)
;
JenkinsRule
.
WebClient
wc
=
j
.
createWebClient
();
wc
.
setThrowExceptionOnFailingStatusCode
(
false
);
HtmlPage
page
=
wc
.
goTo
(
"exception"
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录