nus-yam/ex-repair huggingface dataset:
Program: CWE-79
Project: CVE-2018-5776
Buggy source:
'use strict';/*!
 * This is a `i18n` language object.
 *
 * Japanese
 *
 * @author
 *   Jalios (Twitter: @Jalios)
 *   Sascha 'SoftCreatR' Greuel
 *
 * @see core/i18n.js
 */
(function (exports) {
	if (exports.ja === undefined) {
		exports.ja = {
			'mejs.plural-form': 0,			
			'mejs.download-file': 'ファイルをダウンロードする',			
			'mejs.install-flash': 'Flash Playerが有効またはインストールされていないブラウザを使用しています。Flash Playerプラグインをオンにするか,https://get.adobe.com/flashplayer/から最新バージョンをダウンロードしてください。',			
			'mejs.fullscreen': '全画面',			
			'mejs.play': '再生',
			'mejs.pause': '一時停止',			
			'mejs.time-slider': 'タイムスライダー',
			'mejs.time-help-text': '1秒進めるには左/右矢印をキーを,10秒進めるには上/下矢印を使います。',
			'mejs.live-broadcast': 'ライブブロードキャスト',			
			'mejs.volume-help-text': '音量を上げたり下げたりするには,上/下矢印を使います。',
			'mejs.unmute': 'ミュートを解除',
			'mejs.mute': 'ミュート',
			'mejs.volume-slider': '音量スライダー',			
			'mejs.video-player': 'ビデオプレーヤー',
			'mejs.audio-player': 'オーディオプレーヤー',			
			'mejs.captions-subtitles': 'キャプション/字幕',
			'mejs.captions-chapters': '章',
			'mejs.none': 'なし',
			'mejs.afrikaans': 'アフリカーンス語',
			'mejs.albanian': 'アルバニア語',
			'mejs.arabic': 'アラビア語',
			'mejs.belarusian': 'ベラルーシ語',
			'mejs.bulgarian': 'ブルガリア語',
			'mejs.catalan': 'カタロニア語',
			'mejs.chinese': '中国語',
			'mejs.chinese-simplified': '中国語（簡体字）',
			'mejs.chinese-traditional': '中国語（繁体字）',
			'mejs.croatian': 'クロアチア語',
			'mejs.czech': 'チェコ語',
			'mejs.danish': 'デンマーク語',
			'mejs.dutch': 'オランダの',
			'mejs.english': '英語',
			'mejs.estonian': 'エストニア語',
			'mejs.filipino': 'フィリピン人',
			'mejs.finnish': 'フィンランド語',
			'mejs.french': 'フランス語',
			'mejs.galician': 'ガリシア人',
			'mejs.german': 'ドイツ語',
			'mejs.greek': 'ギリシャ語',
			'mejs.haitian-creole': 'ハイチクレオール',
			'mejs.hebrew': 'ヘブライ語',
			'mejs.hindi': 'ヒンディー語',
			'mejs.hungarian': 'ハンガリー語',
			'mejs.icelandic': 'アイスランド語',
			'mejs.indonesian': 'インドネシア語',
			'mejs.irish': 'アイルランド',
			'mejs.italian': 'イタリア語',
			'mejs.japanese': '日本語',
			'mejs.korean': '韓国語',
			'mejs.latvian': 'ラトビア語',
			'mejs.lithuanian': 'リトアニア語',
			'mejs.macedonian': 'マケドニアの',
			'mejs.malay': 'マレー語',
			'mejs.maltese': 'マルタ',
			'mejs.norwegian': 'ノルウェー語',
			'mejs.persian': 'ペルシア語',
			'mejs.polish': 'ポーランド語',
			'mejs.portuguese': 'ポルトガル語',
			'mejs.romanian': 'ルーマニア語',
			'mejs.russian': 'ロシア語',
			'mejs.serbian': 'セルビア語',
			'mejs.slovak': 'スロバキア語',
			'mejs.slovenian': 'スロベニア語',
			'mejs.spanish': 'スペイン語',
			'mejs.swahili': 'スワヒリ語',
			'mejs.swedish': 'スウェーデン語',
			'mejs.tagalog': 'タガログ',
			'mejs.thai': 'タイ',
			'mejs.turkish': 'トルコ語',
			'mejs.ukrainian': 'ウクライナ語',
			'mejs.vietnamese': 'ベトナム語',
			'mejs.welsh': 'ウェールズ',
			'mejs.yiddish': 'イディッシュ'
		};
	}
})(mejs.i18n);

Fixed version (ground truth):
None
Program: CWE-79
Project: CVE-2018-6354
Buggy source:
{% extends 'layouts/message.html' %}

{% block base %}
  <div class="container narrow card">
    <div class="container" id="header">
      <div class="col-1-1 header success">
        <i class="ion ion-thumbsup"></i>
      </div>
    </div>

    <div class="container">
      <div class="col-1-1">
        <h1>Form submitted successfully</h1>
        {% if request.args.get('next') %}
          <a href="{{ request.args.get('next') }}" class="button" style="margin-top: 1em;">Return to original site</a>
        {% endif %}
      </div>
    </div>
  </div>
{% endblock base %}


Fixed version (ground truth):
{% extends 'layouts/message.html' %}

{% block base %}
  <div class="container narrow card">
    <div class="container" id="header">
      <div class="col-1-1 header success">
        <i class="ion ion-thumbsup"></i>
      </div>
    </div>

    <div class="container">
      <div class="col-1-1">
        <h1>Form submitted successfully</h1>
      </div>
    </div>
  </div>
{% endblock base %}
Program: CWE-79
Project: CVE-2018-6834
Buggy source:
{% extends 'layouts/message.html' %}

{% block base %}
  <div class="container narrow card">
    <div class="container" id="header">
      <div class="col-1-1 header success">
        <i class="ion ion-thumbsup"></i>
      </div>
    </div>

    <div class="container">
      <div class="col-1-1">
        <h1>Form submitted successfully</h1>
        {% if request.args.get('next') %}
          <a href="{{ request.args.get('next') }}" class="button" style="margin-top: 1em;">Return to original site</a>
        {% endif %}
      </div>
    </div>
  </div>
{% endblock base %}


Fixed version (ground truth):
{% extends 'layouts/message.html' %}

{% block base %}
  <div class="container narrow card">
    <div class="container" id="header">
      <div class="col-1-1 header success">
        <i class="ion ion-thumbsup"></i>
      </div>
    </div>

    <div class="container">
      <div class="col-1-1">
        <h1>Form submitted successfully</h1>
      </div>
    </div>
  </div>
{% endblock base %}
Program: CWE-79
Project: CVE-2018-7652
Buggy source:
package Zonemaster::GUI::Dancer::Export;

use warnings;
use 5.14.2;

use Dancer ':syntax';
use Plack::Builder;
use HTML::Entities;
use Zonemaster::GUI::Dancer::Client;

our $VERSION = '1.0.7';

my $backend_port = 5000;
$backend_port = $ENV{ZONEMASTER_BACKEND_PORT} if ($ENV{ZONEMASTER_BACKEND_PORT});
my $url = "http://localhost:$backend_port";

any [ 'get', 'post' ] => '/export' => sub {
    header( 'Cache-Control' => 'no-store, no-cache, must-revalidate' );
    my %allparams = params;
    no warnings 'uninitialized';

    if ( $allparams{'type'} eq 'HTML' ) {
		my $c = Zonemaster::GUI::Dancer::Client->new( { url => $url } );
		my $test_result = $c->get_test_results( { id => $allparams{'test_id'}, language => $allparams{'lang'} } );

		my @test_results;
		my $previous_module = '';
		foreach my $result ( @{ $test_result->{results} } ) {
			if ( $previous_module ne $result->{module} ) {
				push( @test_results, { is_module => 1, message => $result->{module} } );
				$previous_module = $result->{module};
			}

			push( @test_results, { is_module => 0, message => $result->{message}, class => "alert alert-$result->{level}" } );
		}

		my $template_params;
		$template_params->{test_results}  = \@test_results;
		template 'export', $template_params, { layout => undef };
    }
};

true;


Fixed version (ground truth):
package Zonemaster::GUI::Dancer::Export;

use warnings;
use 5.14.2;

use Dancer ':syntax';
use Plack::Builder;
use HTML::Entities;
use Zonemaster::GUI::Dancer::Client;

our $VERSION = '1.0.7';

my $backend_port = 5000;
$backend_port = $ENV{ZONEMASTER_BACKEND_PORT} if ($ENV{ZONEMASTER_BACKEND_PORT});
my $url = "http://localhost:$backend_port";

any [ 'get', 'post' ] => '/export' => sub {
    header( 'Cache-Control' => 'no-store, no-cache, must-revalidate' );
    my %allparams = params;
    no warnings 'uninitialized';

    if ( $allparams{'type'} eq 'HTML' ) {
		my $c = Zonemaster::GUI::Dancer::Client->new( { url => $url } );
		my $test_result = $c->get_test_results( { id => $allparams{'test_id'}, language => $allparams{'lang'} } );

		my @test_results;
		my $previous_module = '';
		foreach my $result ( @{ $test_result->{results} } ) {
			if ( $previous_module ne $result->{module} ) {
				push( @test_results, { is_module => 1, message => $result->{module} } );
				$previous_module = $result->{module};
			}

			push( @test_results, { is_module => 0, message => HTML::Entities::encode($result->{message}), class => "alert alert-$result->{level}" } );
		}

		my $template_params;
		$template_params->{test_results}  = \@test_results;
		template 'export', $template_params, { layout => undef };
    }
};

true;
Program: CWE-79
Project: CVE-2018-8899
Buggy source:
﻿<?xml version="1.0" encoding="utf-8"?>

<!--
Copyright (c) Brock Allen & Dominick Baier. All rights reserved.
Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information.
-->
<configuration>
  <!--
    Configure your application settings in appsettings.json. Learn more at http://go.microsoft.com/fwlink/?LinkId=786380
  -->
  <system.webServer>
    <handlers>
      <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
    </handlers>
    <aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="true" />
  </system.webServer>
</configuration>

Fixed version (ground truth):
﻿<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (c) Brock Allen & Dominick Baier. All rights reserved.
Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information.
-->
<configuration>
  <!--
    Configure your application settings in appsettings.json. Learn more at http://go.microsoft.com/fwlink/?LinkId=786380
  -->
  <system.webServer>
    <handlers>
      <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
    </handlers>
    <aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="true" startupTimeLimit="3600" requestTimeout="23:00:00" />
  </system.webServer>
</configuration>
Program: CWE-79
Project: CVE-2019-10909
Buggy source:
<?php if (count($errors) > 0): ?>
    <ul>
        <?php foreach ($errors as $error): ?>
            <li><?php echo $error->getMessage() ?></li>
        <?php endforeach; ?>
    </ul>
<?php endif ?>


Fixed version (ground truth):
<?php if (count($errors) > 0): ?>
    <ul>
        <?php foreach ($errors as $error): ?>
            <li><?php echo $view->escape($error->getMessage()) ?></li>
        <?php endforeach; ?>
    </ul>
<?php endif ?>
Program: CWE-79
Project: CVE-2019-14512
Buggy source:
<div class="<?php echo $sizeClass; ?> ls-flex-column ls-panelboxes-panelbox text-primary" >
    <div class="panel panel-primary panel-clickable ls-panelboxes-panelbox-inner selector__<?=str_replace(' ', '_', strtolower($title))?>"
        id="panel-<?php echo $position; ?>"
        data-url="<?php echo $url; ?>"
        <?php if ($external): ?>
            data-target="_blank"
        <?php endif; ?>
    >
        <div class="panel-heading">
            <div class="panel-title h4"><?php eT($title); ?></div>
        </div>
        <div class="panel-body">
            <div class="panel-body-ico">
                <span class="sr-only"><?php eT($title); ?></span>
                <span class="<?php echo CHtml::encode($ico); ?>" style="font-size: 4em">
                </span>
            </div>
            <div class="panel-body-link">
                <?php eT($description); ?>
                <?php if ($external): ?>
                    &nbsp;<i class="fa fa-external-link"></i>
                <?php endif; ?>
            </div>
        </div>
    </div>
</div>


Fixed version (ground truth):
<div class="<?php echo $sizeClass; ?> ls-flex-column ls-panelboxes-panelbox text-primary" >
    <div class="panel panel-primary panel-clickable ls-panelboxes-panelbox-inner selector__<?php echo CHtml::encode(str_replace(' ', '_', strtolower(strip_tags($title)))) ?>"
        id="panel-<?php echo $position; ?>"
        data-url="<?php echo CHtml::encode($url); ?>"
        <?php if ($external): ?>
            data-target="_blank"
        <?php endif; ?>
    >
        <div class="panel-heading">
            <div class="panel-title h4"><?php eT($title); ?></div>
        </div>
        <div class="panel-body">
            <div class="panel-body-ico">
                <span class="sr-only"><?php eT($title); ?></span>
                <span class="<?php echo CHtml::encode($ico); ?>" style="font-size: 4em">
                </span>
            </div>
            <div class="panel-body-link">
                <?php eT($description); ?>
                <?php if ($external): ?>
                    &nbsp;<i class="fa fa-external-link"></i>
                <?php endif; ?>
            </div>
        </div>
    </div>
</div>
Program: CWE-79
Project: CVE-2019-15810
Buggy source:
<table id="data-table" class="table table-striped table-bordered" width="100%" cellspacing="0">
  <thead>
    <tr>
      <th class="nd_center-cell">Device</th>
      <th class="nd_center-cell">Address</th>
      <th class="nd_center-cell">Contact</th>
      <th class="nd_center-cell">Location</th>
    </tr>
  </thead>
</table>

<script type="text/javascript">
$(document).ready(function() {
  var table = $('#data-table').dataTable({
    "deferRender": true,
    "data": [% results %],
    "columns": [{
        "data": 'ip',
        "render": function(data, type, row, meta) {
          return '<a href="[% search_device %]&q=' + encodeURIComponent(data) + '">' + he.encode(row.dns || row.name || row.ip) + '</a>';
        }
      }, {
        "data": 'alias',
        "render": function(data, type, row, meta) {
          return he.encode(data || '');
        }
      }, {
        "data": 'contact',
        "render": function(data, type, row, meta) {
          return he.encode(data || '');
        }
      }, {
        "data": 'location',
        "render": function(data, type, row, meta) {
          return he.encode(data || '');
        }
      }
    ],
[% INCLUDE 'ajax/datatabledefaults.tt' -%]
  });
});</script>


Fixed version (ground truth):
<table id="data-table" class="table table-striped table-bordered" width="100%" cellspacing="0">
  <thead>
    <tr>
      <th class="nd_center-cell">Device</th>
      <th class="nd_center-cell">Address</th>
      <th class="nd_center-cell">Contact</th>
      <th class="nd_center-cell">Location</th>
    </tr>
  </thead>
</table>

<script type="text/javascript">
$(document).ready(function() {
  var table = $('#data-table').dataTable({
    "deferRender": true,
    "data": [% results | none %],
    "columns": [{
        "data": 'ip',
        "render": function(data, type, row, meta) {
          return '<a href="[% search_device | none %]&q=' + encodeURIComponent(data) + '">' + he.encode(row.dns || row.name || row.ip) + '</a>';
        }
      }, {
        "data": 'alias',
        "render": function(data, type, row, meta) {
          return he.encode(data || '');
        }
      }, {
        "data": 'contact',
        "render": function(data, type, row, meta) {
          return he.encode(data || '');
        }
      }, {
        "data": 'location',
        "render": function(data, type, row, meta) {
          return he.encode(data || '');
        }
      }
    ],
[% INCLUDE 'ajax/datatabledefaults.tt' -%]
  });
});</script>
Program: CWE-79
Project: CVE-2019-16222
Buggy source:
<?php
/**
 * WordPress Version
 *
 * Contains version information for the current WordPress release.
 *
 * @package WordPress
 * @since 1.1.0
 */

/**
 * The WordPress version string
 *
 * @global string $wp_version
 */
$wp_version = '5.3-alpha-45990';

/**
 * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
 *
 * @global int $wp_db_version
 */
$wp_db_version = 45805;

/**
 * Holds the TinyMCE version
 *
 * @global string $tinymce_version
 */
$tinymce_version = '4940-20190515';

/**
 * Holds the required PHP version
 *
 * @global string $required_php_version
 */
$required_php_version = '5.6.20';

/**
 * Holds the required MySQL version
 *
 * @global string $required_mysql_version
 */
$required_mysql_version = '5.0';


Fixed version (ground truth):
<?php
/**
 * WordPress Version
 *
 * Contains version information for the current WordPress release.
 *
 * @package WordPress
 * @since 1.1.0
 */

/**
 * The WordPress version string
 *
 * @global string $wp_version
 */
$wp_version = '5.3-alpha-45997';

/**
 * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
 *
 * @global int $wp_db_version
 */
$wp_db_version = 45805;

/**
 * Holds the TinyMCE version
 *
 * @global string $tinymce_version
 */
$tinymce_version = '4940-20190515';

/**
 * Holds the required PHP version
 *
 * @global string $required_php_version
 */
$required_php_version = '5.6.20';

/**
 * Holds the required MySQL version
 *
 * @global string $required_mysql_version
 */
$required_mysql_version = '5.0';
Program: CWE-79
Project: CVE-2019-16763
Buggy source:
<?php
/**
 * WordPress Version
 *
 * Contains version information for the current WordPress release.
 *
 * @package WordPress
 * @since 1.1.0
 */

/**
 * The WordPress version string
 *
 * @global string $wp_version
 */
$wp_version = '5.3-alpha-45990';

/**
 * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
 *
 * @global int $wp_db_version
 */
$wp_db_version = 45805;

/**
 * Holds the TinyMCE version
 *
 * @global string $tinymce_version
 */
$tinymce_version = '4940-20190515';

/**
 * Holds the required PHP version
 *
 * @global string $required_php_version
 */
$required_php_version = '5.6.20';

/**
 * Holds the required MySQL version
 *
 * @global string $required_mysql_version
 */
$required_mysql_version = '5.0';


Fixed version (ground truth):
<?php
/**
 * WordPress Version
 *
 * Contains version information for the current WordPress release.
 *
 * @package WordPress
 * @since 1.1.0
 */

/**
 * The WordPress version string
 *
 * @global string $wp_version
 */
$wp_version = '5.3-alpha-45997';

/**
 * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
 *
 * @global int $wp_db_version
 */
$wp_db_version = 45805;

/**
 * Holds the TinyMCE version
 *
 * @global string $tinymce_version
 */
$tinymce_version = '4940-20190515';

/**
 * Holds the required PHP version
 *
 * @global string $required_php_version
 */
$required_php_version = '5.6.20';

/**
 * Holds the required MySQL version
 *
 * @global string $required_mysql_version
 */
$required_mysql_version = '5.0';
Program: CWE-79
Project: CVE-2019-19855
Buggy source:
.d-flex.justify-content-between.flex-wrap.flex-md-nowrap.align-items-center.pt-3.pb-2.mb-3.border-bottom
  %h1.h2 Editing #{@report.report_name} Report

%h2.h4 Current Authors
.table-responsive.col-6.px-0
  %table.table.table-striped.table-sm
    %tbody
      %tr
        %td
          #{@report.owner}
        %td
          &nbsp;
      - if @report.authors
        - @report.authors.each do |user|
          %tr
            %td
              #{user}
            %td.text-right
              %a.btn.btn-sm.btn-danger{ :href => "/admin/del_user_report/#{@report.id}/#{user}" }
                %i.far.fa-trash-alt{ :title => "Remove Author" }

%br

%form{ :method => "post", :action => "/admin/add_user/#{@report.id}" }
  .form-group.row
    %label.col-lg-2.col-form-label{ :for => "author" } Add Collaborator
    .col-lg-4
      %select#author.custom-select{ :name => "author" }
        - @users.each do |user|
          %option #{user.username}

  %br
  %input.btn.btn-primary{ :type => "submit", :value => "Add" }
  %a.btn.btn-secondary{ :href => "/reports/list" }
    Cancel


Fixed version (ground truth):
.d-flex.justify-content-between.flex-wrap.flex-md-nowrap.align-items-center.pt-3.pb-2.mb-3.border-bottom
  %h1.h2 Editing #{@report.report_name} Report FFFF

%h2.h4 Current Authors
.table-responsive.col-6.px-0
  %table.table.table-striped.table-sm
    %tbody
      %tr
        %td
          #{@report.owner}
        %td
          &nbsp;
      - if @report.authors
        - @report.authors.each do |user|
          %tr
            %td
              :escaped
                #{user}
            %td.text-right
              %a.btn.btn-sm.btn-danger{ :href => "/admin/del_user_report/#{@report.id}/#{user}" }
                %i.far.fa-trash-alt{ :title => "Remove Author" }

%br

%form{ :method => "post", :action => "/admin/add_user/#{@report.id}" }
  .form-group.row
    %label.col-lg-2.col-form-label{ :for => "author" } Add Collaborator
    .col-lg-4
      %select#author.custom-select{ :name => "author" }
        - @users.each do |user|
          %option #{user.username}

  %br
  %input.btn.btn-primary{ :type => "submit", :value => "Add" }
  %a.btn.btn-secondary{ :href => "/reports/list" }
    Cancel
Program: CWE-79
Project: CVE-2019-19856
Buggy source:
.d-flex.justify-content-between.flex-wrap.flex-md-nowrap.align-items-center.pt-3.pb-2.mb-3.border-bottom
  %h1.h2 Editing #{@report.report_name} Report

%h2.h4 Current Authors
.table-responsive.col-6.px-0
  %table.table.table-striped.table-sm
    %tbody
      %tr
        %td
          #{@report.owner}
        %td
          &nbsp;
      - if @report.authors
        - @report.authors.each do |user|
          %tr
            %td
              #{user}
            %td.text-right
              %a.btn.btn-sm.btn-danger{ :href => "/admin/del_user_report/#{@report.id}/#{user}" }
                %i.far.fa-trash-alt{ :title => "Remove Author" }

%br

%form{ :method => "post", :action => "/admin/add_user/#{@report.id}" }
  .form-group.row
    %label.col-lg-2.col-form-label{ :for => "author" } Add Collaborator
    .col-lg-4
      %select#author.custom-select{ :name => "author" }
        - @users.each do |user|
          %option #{user.username}

  %br
  %input.btn.btn-primary{ :type => "submit", :value => "Add" }
  %a.btn.btn-secondary{ :href => "/reports/list" }
    Cancel


Fixed version (ground truth):
.d-flex.justify-content-between.flex-wrap.flex-md-nowrap.align-items-center.pt-3.pb-2.mb-3.border-bottom
  %h1.h2 Editing #{@report.report_name} Report FFFF

%h2.h4 Current Authors
.table-responsive.col-6.px-0
  %table.table.table-striped.table-sm
    %tbody
      %tr
        %td
          #{@report.owner}
        %td
          &nbsp;
      - if @report.authors
        - @report.authors.each do |user|
          %tr
            %td
              :escaped
                #{user}
            %td.text-right
              %a.btn.btn-sm.btn-danger{ :href => "/admin/del_user_report/#{@report.id}/#{user}" }
                %i.far.fa-trash-alt{ :title => "Remove Author" }

%br

%form{ :method => "post", :action => "/admin/add_user/#{@report.id}" }
  .form-group.row
    %label.col-lg-2.col-form-label{ :for => "author" } Add Collaborator
    .col-lg-4
      %select#author.custom-select{ :name => "author" }
        - @users.each do |user|
          %option #{user.username}

  %br
  %input.btn.btn-primary{ :type => "submit", :value => "Add" }
  %a.btn.btn-secondary{ :href => "/reports/list" }
    Cancel
Program: CWE-79
Project: CVE-2019-19858
Buggy source:
.d-flex.justify-content-between.flex-wrap.flex-md-nowrap.align-items-center.pt-3.pb-2.mb-3.border-bottom
  %h1.h2 Editing #{@report.report_name} Report

%h2.h4 Current Authors
.table-responsive.col-6.px-0
  %table.table.table-striped.table-sm
    %tbody
      %tr
        %td
          #{@report.owner}
        %td
          &nbsp;
      - if @report.authors
        - @report.authors.each do |user|
          %tr
            %td
              #{user}
            %td.text-right
              %a.btn.btn-sm.btn-danger{ :href => "/admin/del_user_report/#{@report.id}/#{user}" }
                %i.far.fa-trash-alt{ :title => "Remove Author" }

%br

%form{ :method => "post", :action => "/admin/add_user/#{@report.id}" }
  .form-group.row
    %label.col-lg-2.col-form-label{ :for => "author" } Add Collaborator
    .col-lg-4
      %select#author.custom-select{ :name => "author" }
        - @users.each do |user|
          %option #{user.username}

  %br
  %input.btn.btn-primary{ :type => "submit", :value => "Add" }
  %a.btn.btn-secondary{ :href => "/reports/list" }
    Cancel


Fixed version (ground truth):
.d-flex.justify-content-between.flex-wrap.flex-md-nowrap.align-items-center.pt-3.pb-2.mb-3.border-bottom
  %h1.h2 Editing #{@report.report_name} Report FFFF

%h2.h4 Current Authors
.table-responsive.col-6.px-0
  %table.table.table-striped.table-sm
    %tbody
      %tr
        %td
          #{@report.owner}
        %td
          &nbsp;
      - if @report.authors
        - @report.authors.each do |user|
          %tr
            %td
              :escaped
                #{user}
            %td.text-right
              %a.btn.btn-sm.btn-danger{ :href => "/admin/del_user_report/#{@report.id}/#{user}" }
                %i.far.fa-trash-alt{ :title => "Remove Author" }

%br

%form{ :method => "post", :action => "/admin/add_user/#{@report.id}" }
  .form-group.row
    %label.col-lg-2.col-form-label{ :for => "author" } Add Collaborator
    .col-lg-4
      %select#author.custom-select{ :name => "author" }
        - @users.each do |user|
          %option #{user.username}

  %br
  %input.btn.btn-primary{ :type => "submit", :value => "Add" }
  %a.btn.btn-secondary{ :href => "/reports/list" }
    Cancel
Program: CWE-79
Project: CVE-2019-3826
Buggy source:
2.7.0


Fixed version (ground truth):
2.7.1
Program: CWE-79
Project: CVE-2020-11062
Buggy source:
<?php
/**
 * ---------------------------------------------------------------------
 * GLPI - Gestionnaire Libre de Parc Informatique
 * Copyright (C) 2015-2018 Teclib' and contributors.
 *
 * http://glpi-project.org
 *
 * based on GLPI - Gestionnaire Libre de Parc Informatique
 * Copyright (C) 2003-2014 by the INDEPNET Development Team.
 *
 * ---------------------------------------------------------------------
 *
 * LICENSE
 *
 * This file is part of GLPI.
 *
 * GLPI is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * GLPI is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with GLPI. If not, see <http://www.gnu.org/licenses/>.
 * ---------------------------------------------------------------------
 */

/**
 * @since 0.85
 */

// Direct access to file
if (strpos($_SERVER['PHP_SELF'], "getDropdownNumber.php")) {
   include ('../inc/includes.php');
   header("Content-Type: text/html; charset=UTF-8");
   Html::header_nocache();
} else if (!defined('GLPI_ROOT')) {
   die("Sorry. You can't access this file directly");
}

Session::checkLoginUser();
echo Dropdown::getDropdownNumber($_POST);


Fixed version (ground truth):
<?php
/**
 * ---------------------------------------------------------------------
 * GLPI - Gestionnaire Libre de Parc Informatique
 * Copyright (C) 2015-2018 Teclib' and contributors.
 *
 * http://glpi-project.org
 *
 * based on GLPI - Gestionnaire Libre de Parc Informatique
 * Copyright (C) 2003-2014 by the INDEPNET Development Team.
 *
 * ---------------------------------------------------------------------
 *
 * LICENSE
 *
 * This file is part of GLPI.
 *
 * GLPI is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * GLPI is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with GLPI. If not, see <http://www.gnu.org/licenses/>.
 * ---------------------------------------------------------------------
 */

/**
 * @since 0.85
 */

// Direct access to file
if (strpos($_SERVER['PHP_SELF'], "getDropdownNumber.php")) {
   include ('../inc/includes.php');
   header("Content-Type: application/json; charset=UTF-8");
   Html::header_nocache();
} else if (!defined('GLPI_ROOT')) {
   die("Sorry. You can't access this file directly");
}

Session::checkLoginUser();
echo Dropdown::getDropdownNumber($_POST);
Program: CWE-79
Project: CVE-2020-11074
Buggy source:
<?php
/**
 * ---------------------------------------------------------------------
 * GLPI - Gestionnaire Libre de Parc Informatique
 * Copyright (C) 2015-2018 Teclib' and contributors.
 *
 * http://glpi-project.org
 *
 * based on GLPI - Gestionnaire Libre de Parc Informatique
 * Copyright (C) 2003-2014 by the INDEPNET Development Team.
 *
 * ---------------------------------------------------------------------
 *
 * LICENSE
 *
 * This file is part of GLPI.
 *
 * GLPI is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * GLPI is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with GLPI. If not, see <http://www.gnu.org/licenses/>.
 * ---------------------------------------------------------------------
 */

/**
 * @since 0.85
 */

// Direct access to file
if (strpos($_SERVER['PHP_SELF'], "getDropdownNumber.php")) {
   include ('../inc/includes.php');
   header("Content-Type: text/html; charset=UTF-8");
   Html::header_nocache();
} else if (!defined('GLPI_ROOT')) {
   die("Sorry. You can't access this file directly");
}

Session::checkLoginUser();
echo Dropdown::getDropdownNumber($_POST);


Fixed version (ground truth):
<?php
/**
 * ---------------------------------------------------------------------
 * GLPI - Gestionnaire Libre de Parc Informatique
 * Copyright (C) 2015-2018 Teclib' and contributors.
 *
 * http://glpi-project.org
 *
 * based on GLPI - Gestionnaire Libre de Parc Informatique
 * Copyright (C) 2003-2014 by the INDEPNET Development Team.
 *
 * ---------------------------------------------------------------------
 *
 * LICENSE
 *
 * This file is part of GLPI.
 *
 * GLPI is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * GLPI is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with GLPI. If not, see <http://www.gnu.org/licenses/>.
 * ---------------------------------------------------------------------
 */

/**
 * @since 0.85
 */

// Direct access to file
if (strpos($_SERVER['PHP_SELF'], "getDropdownNumber.php")) {
   include ('../inc/includes.php');
   header("Content-Type: application/json; charset=UTF-8");
   Html::header_nocache();
} else if (!defined('GLPI_ROOT')) {
   die("Sorry. You can't access this file directly");
}

Session::checkLoginUser();
echo Dropdown::getDropdownNumber($_POST);
Program: CWE-79
Project: CVE-2020-23014
Buggy source:
from app import apfell, links, use_ssl
from sanic import response
from jinja2 import Environment, PackageLoader
from sanic_jwt.decorators import scoped, inject_user
from app.routes.routes import respect_pivot
import urllib.parse

env = Environment(loader=PackageLoader('app', 'templates'))


@apfell.route("/apiui/command_help")
@inject_user()
@scoped(['auth:user', 'auth:apitoken_user'], False)  # user or user-level api token are ok
async def apiui_command_help(request, user):
    template = env.get_template('apiui_command_help.html')
    if len(request.query_args) != 0:
        data = urllib.parse.unquote(request.query_args[0][1])
        print(data)
    else:
        data = ""
    if use_ssl:
        content = template.render(links=await respect_pivot(links, request), name=user['username'], http="https",
                                  ws="wss", config=user['ui_config'], view_utc_time=user['view_utc_time'], agent=data)
    else:
        content = template.render(links=await respect_pivot(links, request), name=user['username'], http="http",
                                  ws="ws", config=user['ui_config'], view_utc_time=user['view_utc_time'], agent=data)
    return response.html(content)

# add links to the routes in this file at the bottom
links['apiui_command_help'] = apfell.url_for('apiui_command_help')


Fixed version (ground truth):
from app import apfell, links, use_ssl, db_objects
from sanic import response
from jinja2 import Environment, PackageLoader
from sanic_jwt.decorators import scoped, inject_user
from app.routes.routes import respect_pivot
import urllib.parse
import app.database_models.model as db_model

env = Environment(loader=PackageLoader('app', 'templates'))


@apfell.route("/apiui/command_help")
@inject_user()
@scoped(['auth:user', 'auth:apitoken_user'], False)  # user or user-level api token are ok
async def apiui_command_help(request, user):
    template = env.get_template('apiui_command_help.html')
    if len(request.query_args) != 0:
        data = urllib.parse.unquote(request.query_args[0][1])
        query = await db_model.payloadtype_query()
        try:
            payloadtype = await db_objects.get(query, ptype=data)
        except Exception as e:
            data = ""
    else:
        data = ""
    if use_ssl:
        content = template.render(links=await respect_pivot(links, request), name=user['username'], http="https",
                                  ws="wss", config=user['ui_config'], view_utc_time=user['view_utc_time'], agent=data)
    else:
        content = template.render(links=await respect_pivot(links, request), name=user['username'], http="http",
                                  ws="ws", config=user['ui_config'], view_utc_time=user['view_utc_time'], agent=data)
    return response.html(content)

# add links to the routes in this file at the bottom
links['apiui_command_help'] = apfell.url_for('apiui_command_help')
Program: CWE-79
Project: CVE-2020-25739
Buggy source:
class Gon
  module JsonDumper
    def self.dump(object)
      MultiJson.dump object,
        mode: :compat, escape_mode: :xss_safe, time_format: :ruby
    end
  end
end


Fixed version (ground truth):
class Gon
  module JsonDumper
    # Taken from ERB::Util
    JSON_ESCAPE_REGEXP	=	/[\u2028\u2029&><]/u
    JSON_ESCAPE	=	{
      "&" => '\u0026',
      ">" => '\u003e',
      "<" => '\u003c',
      "\u2028" => '\u2028',
      "\u2029" => '\u2029'
    }

    def self.dump(object)
      dumped_json = MultiJson.dump object,
        mode: :compat, escape_mode: :xss_safe, time_format: :ruby
      escape(dumped_json)
    end

    def self.escape(json)
      json.gsub(JSON_ESCAPE_REGEXP, JSON_ESCAPE)
    end
  end
end
Program: CWE-79
Project: CVE-2020-26239
Buggy source:
export default async function ({ addon, console }) {
  await addon.tab.loadScript("https://cdn.jsdelivr.net/npm/linkifyjs@2.1.9/dist/linkify.min.js");
  await addon.tab.loadScript("https://cdn.jsdelivr.net/npm/linkifyjs@2.1.9/dist/linkify-element.min.js");

  const pageType = document.location.pathname.substr(1).split("/")[0];

  switch (pageType) {
    case "users":
      document.querySelectorAll("#user-details .read-only").forEach((element) => linkifyElement(element));
      break;

    case "projects":
      (async () => {
        while (true) {
          let element = await addon.tab.waitForElement(".project-description", { markAsSeen: true });
          // Need to convert #[numbers] to solve conflict between tags and external Scratch player links.
          document.querySelectorAll(".project-description a").forEach((element) => {
            if (/\d+/.test(element.textContent)) element.outerHTML = element.textContent;
          });
          element.normalize();
          linkifyElement(element);
        }
      })();
      break;

    case "studios":
      linkifyElement(document.querySelector("#description.read-only .overview"));
      break;
  }

  (async () => {
    while (true) {
      let comment = await addon.tab.waitForElement(".comment", { markAsSeen: true });
      linkifyElement(comment);
    }
  })();
}


Fixed version (ground truth):
export default async function ({ addon, console }) {
  await addon.tab.loadScript("https://cdn.jsdelivr.net/npm/linkifyjs@2.1.9/dist/linkify.min.js");
  await addon.tab.loadScript("https://cdn.jsdelivr.net/npm/linkifyjs@2.1.9/dist/linkify-element.min.js");

  const pageType = document.location.pathname.substr(1).split("/")[0];

  switch (pageType) {
    case "users":
      document.querySelectorAll("#user-details .read-only").forEach((element) => linkifyElement(element));
      break;

    case "projects":
      (async () => {
        while (true) {
          let element = await addon.tab.waitForElement(".project-description", { markAsSeen: true });
          // Need to convert #[numbers] to solve conflict between tags and external Scratch player links.
          document.querySelectorAll(".project-description a").forEach((element) => {
              if (/^#\d+$/.test(element.textContent) && element.previousSibling instanceof Text) {
                  element.previousSibling.textContent += element.textContent;
                  element.remove();
              }
          });
          element.normalize();
          linkifyElement(element);
        }
      })();
      break;

    case "studios":
      linkifyElement(document.querySelector("#description.read-only .overview"));
      break;
  }

  (async () => {
    while (true) {
      let comment = await addon.tab.waitForElement(".comment", { markAsSeen: true });
      linkifyElement(comment);
    }
  })();
}
Program: CWE-79
Project: CVE-2020-27163
Buggy source:
<?php
define('LOGIN_PAGE', true);

require_once 'includes/common.inc.php';

$page['css'][] = 'login';

require 'includes/header.inc.php';

// Layout borrowed from http://getbootstrap.com/examples/signin/
?>

<h1 class="logo">phpRedisAdmin</h1>

<form class="form-signin" method="post" action="login.php">
    <h2 class="form-signin-heading">Please log in</h2>

    <?php if (isset($_POST['username']) || isset($_POST['password'])): ?>
        <div class="invalid-credentials">
            <h3>Invalid username/password</h3>
            <p>Please try again.</p>
        </div>
    <?php endif; ?>

    <label for="inputUser" class="sr-only">Username</label>
    <input type="text" name="username" id="inputUser" class="form-control"
           placeholder="Username"
           value="<?= isset($_POST['username']) ? $_POST['username'] : '' ?>"
           required <?= isset($_POST['username']) ? '' : 'autofocus' ?>>

    <label for="inputPassword" class="sr-only">Password</label>
    <input type="password" name="password" id="inputPassword" class="form-control"
           placeholder="Password"
           required <?= isset($_POST['username']) ? 'autofocus' : '' ?>>

    <button class="btn btn-lg btn-primary btn-block" type="submit">Log in</button>
</form>

<?php

require 'includes/footer.inc.php';

?>


Fixed version (ground truth):
<?php
define('LOGIN_PAGE', true);

require_once 'includes/common.inc.php';

$page['css'][] = 'login';

require 'includes/header.inc.php';

// Layout borrowed from http://getbootstrap.com/examples/signin/
?>

<h1 class="logo">phpRedisAdmin</h1>

<form class="form-signin" method="post" action="login.php">
    <h2 class="form-signin-heading">Please log in</h2>

    <?php if (isset($_POST['username']) || isset($_POST['password'])): ?>
        <div class="invalid-credentials">
            <h3>Invalid username/password</h3>
            <p>Please try again.</p>
        </div>
    <?php endif; ?>

    <label for="inputUser" class="sr-only">Username</label>
    <input type="text" name="username" id="inputUser" class="form-control"
           placeholder="Username"
           value="<?= isset($_POST['username']) ? htmlentities($_POST['username'], defined('ENT_SUBSTITUTE') ? (ENT_QUOTES | ENT_SUBSTITUTE) : ENT_QUOTES, 'utf-8') : '' ?>"
           required <?= isset($_POST['username']) ? '' : 'autofocus' ?>>

    <label for="inputPassword" class="sr-only">Password</label>
    <input type="password" name="password" id="inputPassword" class="form-control"
           placeholder="Password"
           required <?= isset($_POST['username']) ? 'autofocus' : '' ?>>

    <button class="btn btn-lg btn-primary btn-block" type="submit">Log in</button>
</form>

<?php

require 'includes/footer.inc.php';

?>
Program: CWE-79
Project: CVE-2020-28947
Buggy source:
<div id="ajaxTemplateElementsIndex">
    <h2><?php echo __('Template Elements');?></h2>
    <ul <?php if ($mayModify): ?> id="sortable" <?php endif; ?> style="list-style:none; margin:0px;">
                <?php
                foreach ($elements as $k => $element):
                    echo $this->element('templateElements/templateRow' . ucfirst($element['TemplateElement']['element_definition']), array('element' => $element, 'element_id' => $element['TemplateElement']['id']));
                endforeach;
            ?>
    </ul>
    <?php if ($mayModify): ?>
    <div id="AddTemplateElementDiv" role="button" tabindex="0" aria-label="<?php echo __('Add a new template element');?>" title="<?php echo __('Add a new template element');?>" class="addTemplateElement useCursorPointer" onClick="templateAddElementClicked(<?php echo $id; ?>);">+</div>
    <?php endif; ?>
</div>
<script type="text/javascript">
$(function() {
    //Return a helper with preserved width of cells
    var fixHelper = function(e, ui) {
        ui.children().each(function() {
            $(this).width($(this).width());
        });
        return ui;
    };

    $("#sortable").sortable({
        helper: fixHelper,
        update: function () {
            var order = [];

            $("#sortable").children().each(function (i) {
                var li = $(this);
                order[i] = li.attr("id");
            });

            saveElementSorting(JSON.stringify(order));
        }
    }).disableSelection();
});
</script>


Fixed version (ground truth):
<div id="ajaxTemplateElementsIndex">
    <h2><?php echo __('Template Elements');?></h2>
    <ul <?php if ($mayModify): ?> id="sortable" <?php endif; ?> style="list-style:none; margin:0px;">
                <?php
                foreach ($elements as $k => $element):
                    echo $this->element('templateElements/templateRow' . ucfirst($element['TemplateElement']['element_definition']), array('element' => $element, 'element_id' => $element['TemplateElement']['id']));
                endforeach;
            ?>
    </ul>
    <?php if ($mayModify): ?>
    <div id="AddTemplateElementDiv" role="button" tabindex="0" aria-label="<?php echo __('Add a new template element');?>" title="<?php echo __('Add a new template element');?>" class="addTemplateElement useCursorPointer" onClick="templateAddElementClicked(<?php echo h($id); ?>);">+</div>
    <?php endif; ?>
</div>
<script type="text/javascript">
$(function() {
    //Return a helper with preserved width of cells
    var fixHelper = function(e, ui) {
        ui.children().each(function() {
            $(this).width($(this).width());
        });
        return ui;
    };

    $("#sortable").sortable({
        helper: fixHelper,
        update: function () {
            var order = [];

            $("#sortable").children().each(function (i) {
                var li = $(this);
                order[i] = li.attr("id");
            });

            saveElementSorting(JSON.stringify(order));
        }
    }).disableSelection();
});
</script>
Program: CWE-79
Project: CVE-2020-29572
Buggy source:
<?php
if (!empty($field['raw'])) {
    $string = $field['raw'];
} else {
    $value = Hash::extract($data, $field['path']);
    $string = empty($value[0]) ? '' : $value[0];
}
if (!empty($field['url'])) {
    if (!empty($field['url_vars'])) {
        if (!is_array($field['url_vars'])) {
            $field['url_vars'] = [$field['url_vars']];
        }
        foreach ($field['url_vars'] as $k => $path) {
            $field['url'] = str_replace('{{' . $k . '}}', $this->Hash->extract($data, $path)[0], $field['url']);
        }
    }
    $string = sprintf(
        '<a href="%s">%s</a>',
        h($field['url']),
        $string
    );
}
echo $string;


Fixed version (ground truth):
<?php
if (!empty($field['raw'])) {
    $string = $field['raw'];
} else {
    $value = Hash::extract($data, $field['path']);
    $string = empty($value[0]) ? '' : h($value[0]);
}
if (!empty($field['url'])) {
    if (!empty($field['url_vars'])) {
        if (!is_array($field['url_vars'])) {
            $field['url_vars'] = [$field['url_vars']];
        }
        foreach ($field['url_vars'] as $k => $path) {
            $field['url'] = str_replace('{{' . $k . '}}', $this->Hash->extract($data, $path)[0], $field['url']);
        }
    }
    $string = sprintf(
        '<a href="%s">%s</a>',
        h($field['url']),
        $string
    );
}
echo $string;
Program: CWE-79
Project: CVE-2020-4038
Buggy source:
# graphql-playground-html

This package is being used by the GraphQL Playground middlewares.

For local development, you can `yarn link` this package, then use `yarn link graphql-playground-html` in the
middleware you want to develop.


Fixed version (ground truth):
# graphql-playground-html

> **SECURITY WARNING:** This package and all of it's dependendents had a severe XSS Reflection attack vulnerability until version `1.6.20` of this package. You must sanitize any and all user input values to `renderPlaygroundPage()` values. If you used static values in your middlewares, including ours, you were not vulnerable to the attack.

This package is being used by the GraphQL Playground middlewares.

For local development, you can `yarn link` this package, then use `yarn link graphql-playground-html` in the
middleware you want to develop.
Program: CWE-79
Project: CVE-2020-4041
Buggy source:
# graphql-playground-html

This package is being used by the GraphQL Playground middlewares.

For local development, you can `yarn link` this package, then use `yarn link graphql-playground-html` in the
middleware you want to develop.


Fixed version (ground truth):
# graphql-playground-html

> **SECURITY WARNING:** This package and all of it's dependendents had a severe XSS Reflection attack vulnerability until version `1.6.20` of this package. You must sanitize any and all user input values to `renderPlaygroundPage()` values. If you used static values in your middlewares, including ours, you were not vulnerable to the attack.

This package is being used by the GraphQL Playground middlewares.

For local development, you can `yarn link` this package, then use `yarn link graphql-playground-html` in the
middleware you want to develop.
Program: CWE-79
Project: CVE-2020-8981
Buggy source:
<?php

# Copyright (c) 2012 John Reese
# Licensed under the MIT license

form_security_validate( 'plugin_Source_repo_delete' );
access_ensure_global_level( plugin_config_get( 'manage_threshold' ) );

$f_repo_id = gpc_get_string( 'id' );

$t_repo = SourceRepo::load( $f_repo_id );

helper_ensure_confirmed( sprintf( plugin_lang_get( 'ensure_delete' ), $t_repo->name ), plugin_lang_get( 'delete_repository' ) );

SourceRepo::delete( $t_repo->id );

form_security_purge( 'plugin_Source_repo_delete' );
print_successful_redirect( plugin_page( 'index', true ) );


Fixed version (ground truth):
<?php

# Copyright (c) 2012 John Reese
# Licensed under the MIT license

form_security_validate( 'plugin_Source_repo_delete' );
access_ensure_global_level( plugin_config_get( 'manage_threshold' ) );

$f_repo_id = gpc_get_string( 'id' );

$t_repo = SourceRepo::load( $f_repo_id );

$t_message = sprintf( plugin_lang_get( 'ensure_delete' ), string_attribute( $t_repo->name ) );
helper_ensure_confirmed( $t_message, plugin_lang_get( 'delete_repository' ) );

SourceRepo::delete( $t_repo->id );

form_security_purge( 'plugin_Source_repo_delete' );
print_successful_redirect( plugin_page( 'index', true ) );
Program: CWE-79
Project: CVE-2020-9038
Buggy source:
None

Fixed version (ground truth):
<img src onerror="" />
<img src onerror="" />