Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-24903

Unabortable builds due to catastrophic backtracking regular expression

    Details

    • Similar Issues:

      Description

      If the user enters a regular expression which results in catastrophic backtracking, the regular expression will run "forever" and the user will not be able to abort the build.

      The attached config.xml demonstrates the issue.

      The solution is to use an interruptible character sequence.

        Attachments

          Activity

          Hide
          ikedam ikedam added a comment -

          Fixed in 1.16.1.
          It will be available in the update center in a day.

          Show
          ikedam ikedam added a comment - Fixed in 1.16.1. It will be available in the update center in a day.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: ikedam
          Path:
          src/main/java/com/chikli/hudson/plugin/naginator/NaginatorPublisher.java
          src/main/java/com/chikli/hudson/plugin/naginator/NaginatorPublisherScheduleAction.java
          src/main/resources/com/chikli/hudson/plugin/naginator/NaginatorPublisher/global.jelly
          src/main/resources/com/chikli/hudson/plugin/naginator/NaginatorPublisher/help-regexpTimeoutMs.html
          src/test/java/com/chikli/hudson/plugin/naginator/NaginatorListenerTest.java
          src/test/java/com/chikli/hudson/plugin/naginator/NaginatorPublisherTest.java
          http://jenkins-ci.org/commit/naginator-plugin/d86ff5bf9adb47c7911d1c83a28b1c43c67946a7
          Log:
          Merge pull request #23 from ikedam/feature/JENKINS-24903_InfiniteRegularExpression

          JENKINS-24903 Aborts long running regular expressions

          Compare: https://github.com/jenkinsci/naginator-plugin/compare/888e8f4bb808...d86ff5bf9adb

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: ikedam Path: src/main/java/com/chikli/hudson/plugin/naginator/NaginatorPublisher.java src/main/java/com/chikli/hudson/plugin/naginator/NaginatorPublisherScheduleAction.java src/main/resources/com/chikli/hudson/plugin/naginator/NaginatorPublisher/global.jelly src/main/resources/com/chikli/hudson/plugin/naginator/NaginatorPublisher/help-regexpTimeoutMs.html src/test/java/com/chikli/hudson/plugin/naginator/NaginatorListenerTest.java src/test/java/com/chikli/hudson/plugin/naginator/NaginatorPublisherTest.java http://jenkins-ci.org/commit/naginator-plugin/d86ff5bf9adb47c7911d1c83a28b1c43c67946a7 Log: Merge pull request #23 from ikedam/feature/ JENKINS-24903 _InfiniteRegularExpression JENKINS-24903 Aborts long running regular expressions Compare: https://github.com/jenkinsci/naginator-plugin/compare/888e8f4bb808...d86ff5bf9adb
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: ikedam
          Path:
          src/main/java/com/chikli/hudson/plugin/naginator/NaginatorPublisher.java
          src/main/java/com/chikli/hudson/plugin/naginator/NaginatorPublisherScheduleAction.java
          src/main/resources/com/chikli/hudson/plugin/naginator/NaginatorPublisher/global.jelly
          src/main/resources/com/chikli/hudson/plugin/naginator/NaginatorPublisher/help-regexpTimeoutMs.html
          src/test/java/com/chikli/hudson/plugin/naginator/NaginatorListenerTest.java
          src/test/java/com/chikli/hudson/plugin/naginator/NaginatorPublisherTest.java
          http://jenkins-ci.org/commit/naginator-plugin/c4aff2b88aa6e1fd6e23bc8dccfcad4f710ebf47
          Log:
          [FIXED JENKINS-24903] Aborts too long running regular expressions. Added a configuration field for the timeout.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: ikedam Path: src/main/java/com/chikli/hudson/plugin/naginator/NaginatorPublisher.java src/main/java/com/chikli/hudson/plugin/naginator/NaginatorPublisherScheduleAction.java src/main/resources/com/chikli/hudson/plugin/naginator/NaginatorPublisher/global.jelly src/main/resources/com/chikli/hudson/plugin/naginator/NaginatorPublisher/help-regexpTimeoutMs.html src/test/java/com/chikli/hudson/plugin/naginator/NaginatorListenerTest.java src/test/java/com/chikli/hudson/plugin/naginator/NaginatorPublisherTest.java http://jenkins-ci.org/commit/naginator-plugin/c4aff2b88aa6e1fd6e23bc8dccfcad4f710ebf47 Log: [FIXED JENKINS-24903] Aborts too long running regular expressions. Added a configuration field for the timeout.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: ikedam
          Path:
          src/test/java/com/chikli/hudson/plugin/naginator/NaginatorListenerTest.java
          http://jenkins-ci.org/commit/naginator-plugin/4012e4cd8b6a22c9e7ff534d46d7d4058e42fd20
          Log:
          JENKINS-24903 Added a test to reproduce a catastrophic backtracking regular expression.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: ikedam Path: src/test/java/com/chikli/hudson/plugin/naginator/NaginatorListenerTest.java http://jenkins-ci.org/commit/naginator-plugin/4012e4cd8b6a22c9e7ff534d46d7d4058e42fd20 Log: JENKINS-24903 Added a test to reproduce a catastrophic backtracking regular expression.
          Show
          ikedam ikedam added a comment - https://github.com/jenkinsci/naginator-plugin/pull/23

            People

            • Assignee:
              ikedam ikedam
              Reporter:
              recampbell Ryan Campbell
            • Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: