Issues (733)

Security Analysis    not enabled

This project does not seem to handle request data directly as such no vulnerable execution paths were found.

  Cross-Site Scripting
Cross-Site Scripting enables an attacker to inject code into the response of a web-request that is viewed by other users. It can for example be used to bypass access controls, or even to take over other users' accounts.
  File Exposure
File Exposure allows an attacker to gain access to local files that he should not be able to access. These files can for example include database credentials, or other configuration files.
  File Manipulation
File Manipulation enables an attacker to write custom data to files. This potentially leads to injection of arbitrary code on the server.
  Object Injection
Object Injection enables an attacker to inject an object into PHP code, and can lead to arbitrary code execution, file exposure, or file manipulation attacks.
  Code Injection
Code Injection enables an attacker to execute arbitrary code on the server.
  Response Splitting
Response Splitting can be used to send arbitrary responses.
  File Inclusion
File Inclusion enables an attacker to inject custom files into PHP's file loading mechanism, either explicitly passed to include, or for example via PHP's auto-loading mechanism.
  Command Injection
Command Injection enables an attacker to inject a shell command that is execute with the privileges of the web-server. This can be used to expose sensitive data, or gain access of your server.
  SQL Injection
SQL Injection enables an attacker to execute arbitrary SQL code on your database server gaining access to user data, or manipulating user data.
  XPath Injection
XPath Injection enables an attacker to modify the parts of XML document that are read. If that XML document is for example used for authentication, this can lead to further vulnerabilities similar to SQL Injection.
  LDAP Injection
LDAP Injection enables an attacker to inject LDAP statements potentially granting permission to run unauthorized queries, or modify content inside the LDAP tree.
  Header Injection
  Other Vulnerability
This category comprises other attack vectors such as manipulating the PHP runtime, loading custom extensions, freezing the runtime, or similar.
  Regex Injection
Regex Injection enables an attacker to execute arbitrary code in your PHP process.
  XML Injection
XML Injection enables an attacker to read files on your local filesystem including configuration files, or can be abused to freeze your web-server process.
  Variable Injection
Variable Injection enables an attacker to overwrite program variables with custom data, and can lead to further vulnerabilities.
Unfortunately, the security analysis is currently not available for your project. If you are a non-commercial open-source project, please contact support to gain access.

makepdf.php (4 issues)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
// 
3
//  ------------------------------------------------------------------------ //
4
//                XOOPS - PHP Content Management System                      //
5
//                  Copyright (c) 2000-2016 XOOPS.org                        //
6
//                       <http://xoops.org/>                             //
7
//  ------------------------------------------------------------------------ //
8
//  This program is free software; you can redistribute it and/or modify     //
9
//  it under the terms of the GNU General Public License as published by     //
10
//  the Free Software Foundation; either version 2 of the License, or        //
11
//  (at your option) any later version.                                      //
12
//                                                                           //
13
//  You may not change or alter any portion of this comment or credits       //
14
//  of supporting developers from this source code or any supporting         //
15
//  source code which is considered copyrighted (c) material of the          //
16
//  original comment or credit authors.                                      //
17
//                                                                           //
18
//  This program is distributed in the hope that it will be useful,          //
19
//  but WITHOUT ANY WARRANTY; without even the implied warranty of           //
20
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            //
21
//  GNU General Public License for more details.                             //
22
//                                                                           //
23
//  You should have received a copy of the GNU General Public License        //
24
//  along with this program; if not, write to the Free Software              //
25
//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA //
26
//  ------------------------------------------------------------------------ //
27
// Author: Kazumi Ono (AKA onokazu)                                          //
28
// URL: http://www.myweb.ne.jp/, http://xoops.org/, http://jp.xoops.org/ //
29
// Project: XOOPS Project                                                    //
30
// ------------------------------------------------------------------------- //
31
32
include_once __DIR__ . '/header.php';
33
//error_reporting(0);
0 ignored issues
show
Unused Code Comprehensibility introduced by
73% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
34
//error_reporting(0);
35
36
$myts = MyTextSanitizer::getInstance();
37
require_once SMARTPARTNER_ROOT_PATH . 'fpdf/fpdf.inc.php';
38
39
$id = isset($_GET['id']) ? (int)$_GET['id'] : 0;
40
41
if ($id == 0) {
42
    redirect_header('javascript:history.go(-1)', 2, _MD_SPARTNER_NOPARTNERSELECTED);
43
}
44
45
// Creating the Partner object for the selected FAQ
46
$partnerObj = new SmartpartnerPartner($id);
47
48
// If the selected partner was not found, exit
49
if ($partnerObj->notLoaded()) {
50
    redirect_header('javascript:history.go(-1)', 2, _MD_SPARTNER_NOPARTNERSELECTED);
51
}
52
53
// Chech the status
54
if ($partnerObj->status() != _SPARTNER_STATUS_ACTIVE) {
55
    redirect_header('javascript:history.go(-1)', 2, _NOPERM);
56
}
57
58
$pdf_data['title']       = $partnerObj->title();
59
$pdf_data['subtitle']    = 'subtitle...';
60
$pdf_data['subsubtitle'] = 'subsubtitle...';
61
$pdf_data['date']        = 'date...';
62
$pdf_data['filename']    = 'filename...'; //preg_replace("/[^0-9a-z\-_\.]/i",'', $myts->htmlSpecialChars($article->topic_title()).' - '.$article->title());
0 ignored issues
show
Unused Code Comprehensibility introduced by
75% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
63
$pdf_data['content']     = $partnerObj->description();
64
$pdf_data['author']      = 'author...';
65
66
echo 'test';
67
//Other stuff
68
$puff   = '<br>';
69
$puffer = '<br><br><br>';
70
71
//create the A4-PDF...
72
$pdf_config['slogan'] = $xoopsConfig['sitename'] . ' - ' . $xoopsConfig['slogan'];
73
74
$pdf = new PDF();
75
$pdf->SetCreator($pdf_config['creator']);
76
$pdf->SetTitle($pdf_data['title']);
77
$pdf->SetAuthor($pdf_config['url']);
78
$pdf->SetSubject($pdf_data['author']);
79
$out = $pdf_config['url'] . ', ' . $pdf_data['author'] . ', ' . $pdf_data['title'] . ', ' . $pdf_data['subtitle'] . ', ' . $pdf_data['subsubtitle'];
80
$pdf->SetKeywords($out);
81
$pdf->SetAutoPageBreak(true, 25);
82
$pdf->SetMargins($pdf_config['margin']['left'], $pdf_config['margin']['top'], $pdf_config['margin']['right']);
83
$pdf->Open();
84
85
//First page
86
$pdf->AddPage();
87
$pdf->SetXY(24, 25);
88
$pdf->SetTextColor(10, 60, 160);
89
$pdf->SetFont($pdf_config['font']['slogan']['family'], $pdf_config['font']['slogan']['style'], $pdf_config['font']['slogan']['size']);
90
$pdf->WriteHTML($pdf_config['slogan'], $pdf_config['scale']);
91
//$pdf->Image($pdf_config['logo']['path'],$pdf_config['logo']['left'],$pdf_config['logo']['top'],$pdf_config['logo']['width'],$pdf_config['logo']['height'],'',$pdf_config['url']);
0 ignored issues
show
Unused Code Comprehensibility introduced by
99% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
92
$pdf->Line(25, 30, 190, 30);
93
$pdf->SetXY(25, 35);
94
$pdf->SetFont($pdf_config['font']['title']['family'], $pdf_config['font']['title']['style'], $pdf_config['font']['title']['size']);
95
$pdf->WriteHTML($pdf_data['title'], $pdf_config['scale']);
96
97 View Code Duplication
if ($pdf_data['subtitle'] <> '') {
98
    $pdf->WriteHTML($puff, $pdf_config['scale']);
99
    $pdf->SetFont($pdf_config['font']['subtitle']['family'], $pdf_config['font']['subtitle']['style'], $pdf_config['font']['subtitle']['size']);
100
    $pdf->WriteHTML($pdf_data['subtitle'], $pdf_config['scale']);
101
}
102 View Code Duplication
if ($pdf_data['subsubtitle'] <> '') {
103
    $pdf->WriteHTML($puff, $pdf_config['scale']);
104
    $pdf->SetFont($pdf_config['font']['subsubtitle']['family'], $pdf_config['font']['subsubtitle']['style'], $pdf_config['font']['subsubtitle']['size']);
105
    $pdf->WriteHTML($pdf_data['subsubtitle'], $pdf_config['scale']);
106
}
107
108
$pdf->WriteHTML($puff, $pdf_config['scale']);
109
$pdf->SetFont($pdf_config['font']['author']['family'], $pdf_config['font']['author']['style'], $pdf_config['font']['author']['size']);
110
$out = NEWS_PDF_AUTHOR . ': ';
111
$out .= $pdf_data['author'];
112
$pdf->WriteHTML($out, $pdf_config['scale']);
113
$pdf->WriteHTML($puff, $pdf_config['scale']);
114
$out = NEWS_PDF_DATE;
115
$out .= $pdf_data['date'];
116
$pdf->WriteHTML($out, $pdf_config['scale']);
117
$pdf->WriteHTML($puff, $pdf_config['scale']);
118
119
$pdf->SetTextColor(0, 0, 0);
120
$pdf->WriteHTML($puffer, $pdf_config['scale']);
121
122
$pdf->SetFont($pdf_config['font']['content']['family'], $pdf_config['font']['content']['style'], $pdf_config['font']['content']['size']);
123
$pdf->WriteHTML($pdf_data['content'], $pdf_config['scale']);
124
125
//$pdf->Output($pdf_data['filename'],'');
0 ignored issues
show
Unused Code Comprehensibility introduced by
92% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
126
$pdf->Output();
127