File tree Expand file tree Collapse file tree 3 files changed +18
-5
lines changed
Expand file tree Collapse file tree 3 files changed +18
-5
lines changed Original file line number Diff line number Diff line change 77 docker build -t $(IMAGE ) :$(TAG ) .
88
99run : docker
10- docker-compose up --build
10+ docker-compose up --build -d
1111
1212# when run with 'make run', makes sure that it responds correctly
1313run-test :
14- curl -v ' http://localhost:8085/rate/submit.php?version=1.234&rating=0&issue=80386' 2>&1
14+ curl -v ' http://localhost:8085/rate/submit.php?version=2.536&rating=0&issue=80386' 2>&1
15+ curl -v ' http://localhost:8085/rate/submit.php?version=2.536&rating=0&issue=https://github.com/jenkinsci/jenkins/issues/20615#issuecomment-3572009192' 2>&1
16+ curl -v ' http://localhost:8085/rate/submit.php?version=2.536&rating=0&issue=https://github.com/jenkinsci/jenkins/issues/20616#issue-3659905060' 2>&1
17+ curl -v ' http://localhost:8085/rate/submit.php?version=2.536&rating=0&issue=https://github.com/jenkinsci/jenkins/issues/20620/#issue-3659905060' 2>&1
18+ curl -v ' http://localhost:8085/rate/submit.php?version=2.536&rating=0&issue=https://github.com/jenkinsci/jenkins/issues/20617/' 2>&1
19+ curl -v ' http://localhost:8085/rate/submit.php?version=2.536&rating=0&issue=https://github.com/jenkinsci/jenkins/issues/20608' 2>&1
1520 curl -v ' http://localhost:8085/rate/result.php' 2>&1
Original file line number Diff line number Diff line change 1111 } else {
1212 $ row = array ('version ' => $ _GET ['version ' ], 'voter ' => $ voter ,
1313 'rollback ' => $ _GET ['rating ' ] == -1 );
14- $ issue = (int )preg_replace ('/^(JENKINS|HUDSON)-/i ' , '' , $ _GET ['issue ' ]);
15- if ($ issue > 0 ) $ row ['issue ' ] = $ issue ;
14+ // Remove any fragment from issue URL
15+ $ issue = preg_replace ('/#.*$/ ' , '' , $ _GET ['issue ' ]);
16+ // Remove trailing slash
17+ $ issue = rtrim ($ issue , '/ ' );
18+ if (isset ($ _GET ['issue ' ]) && preg_match ('#^https://github\.com/jenkinsci/[a-zA-Z0-9._-]+/issues/(\d+)$# ' , $ issue , $ matches )) {
19+ $ row ['issue ' ] = $ issue ;
20+ } else {
21+ $ issue = (int )preg_replace ('/^(JENKINS|HUDSON)-/i ' , '' , $ _GET ['issue ' ]);
22+ if ($ issue > 0 ) $ row ['issue ' ] = $ issue ;
23+ }
1624 pg_insert ($ db , 'jenkins_bad ' , $ row );
1725 }
1826 pg_close ($ db );
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ SET client_encoding = 'UTF8';
33CREATE TABLE jenkins_bad (
44 version character varying (10 ) NOT NULL ,
55 rollback boolean NOT NULL ,
6- issue integer ,
6+ issue text ,
77 voter character varying (30 )
88);
99
You can’t perform that action at this time.
0 commit comments