1616import com .atlassian .bitbucket .repository .RepositoryService ;
1717import com .atlassian .bitbucket .server .ApplicationPropertiesService ;
1818import com .atlassian .bitbucket .user .ApplicationUser ;
19+ import com .atlassian .bitbucket .user .SecurityService ;
1920import com .google .common .annotations .VisibleForTesting ;
2021import com .google .common .base .Supplier ;
2122
@@ -27,6 +28,7 @@ public class PrnfbRenderer {
2728 private final PullRequest pullRequest ;
2829 private final PrnfbPullRequestAction pullRequestAction ;
2930 private final RepositoryService repositoryService ;
31+ private final SecurityService securityService ;
3032 /**
3133 * Contains special variables that are only available for specific events like
3234 * {@link PrnfbVariable#BUTTON_TRIGGER_TITLE} and
@@ -36,14 +38,15 @@ public class PrnfbRenderer {
3638
3739 PrnfbRenderer (PullRequest pullRequest , PrnfbPullRequestAction pullRequestAction , ApplicationUser applicationUser ,
3840 RepositoryService repositoryService , ApplicationPropertiesService propertiesService ,
39- PrnfbNotification prnfbNotification , Map <PrnfbVariable , Supplier <String >> variables ) {
41+ PrnfbNotification prnfbNotification , Map <PrnfbVariable , Supplier <String >> variables , SecurityService securityService ) {
4042 this .pullRequest = pullRequest ;
4143 this .pullRequestAction = pullRequestAction ;
4244 this .applicationUser = applicationUser ;
4345 this .repositoryService = repositoryService ;
4446 this .prnfbNotification = prnfbNotification ;
4547 this .propertiesService = propertiesService ;
4648 this .variables = variables ;
49+ this .securityService = securityService ;
4750 }
4851
4952 public String render (String string , Boolean forUrl , ClientKeyStore clientKeyStore , Boolean shouldAcceptAnyCertificate ) {
@@ -64,7 +67,7 @@ private String getRenderedString(String string, Boolean forUrl, ClientKeyStore c
6467 throws UnsupportedEncodingException {
6568 String resolved = variable .resolve (this .pullRequest , this .pullRequestAction , this .applicationUser ,
6669 this .repositoryService , this .propertiesService , this .prnfbNotification , this .variables , clientKeyStore ,
67- shouldAcceptAnyCertificate );
70+ shouldAcceptAnyCertificate , this . securityService );
6871 return getRenderedStringResolved (string , forUrl , regExpStr , resolved );
6972 }
7073
0 commit comments