Issues (661)

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.

fpdf/language/korean.php (7 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
// $Id: korean.php 8112 2011-11-06 13:41:14Z beckmi $
3
//  ------------------------------------------------------------------------ //
4
//                XOOPS - PHP Content Management System                      //
5
//                    Copyright (c) 2000 XOOPS.org                           //
6
//                       <http://www.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://www.xoops.org/, http://jp.xoops.org/ //
29
// Project: The XOOPS Project                                                //
30
// ------------------------------------------------------------------------- //
31
if (!defined('XOOPS_ROOT_PATH')) {
32
  die('XOOPS root path not defined');
33
}
34
35
require NEWS_FPDF_PATH.'/korean.php';
36
37
// For end users
38
$valid_pfd_charset = '';
39
40
$pdf_config['margin'] = array(
41
  'left'=>25,
42
  'top'=>25,
43
  'right'=>25
44
  );
45
46
$pdf_config['logo'] = array(
47
  'path'=>'images/news_slogo.png',
48
  'left'=>150,
49
  'top'=>5,
50
  'width'=>0,
51
  'height'=>0
52
  );
53
54
$pdf_config['font']['slogan'] = array(
55
  'family'=>'UHC-hw',
56
  'style'=>'bi',
57
  'size'=>8
58
  );
59
60
$pdf_config['font']['title'] = array(
61
  'family'=>'UHC-hw',
62
  'style'=>'biu',
63
  'size'=>12
64
  );
65
66
$pdf_config['font']['subject'] = array(
67
  'family'=>'UHC-hw',
68
  'style'=>'b',
69
  'size'=>11
70
  );
71
72
$pdf_config['font']['author'] = array(
73
  'family'=>'UHC-hw',
74
  'style'=>'',
75
  'size'=>10
76
  );
77
78
$pdf_config['font']['subtitle'] = array(
79
  'family'=>'UHC-hw',
80
  'style'=>'b',
81
  'size'=>11
82
  );
83
84
$pdf_config['font']['subsubtitle'] = array(
85
  'family'=>'UHC-hw',
86
  'style'=>'b',
87
  'size'=>10
88
  );
89
90
$pdf_config['font']['content'] = array(
91
  'family'=>'UHC-hw',
92
  'style'=>'',
93
  'size'=>10
94
  );
95
96
$pdf_config['font']['footer'] = array(
97
  'family'=>'UHC-hw',
98
  'style'=>'',
99
  'size'=>8
100
  );
101
102
$pdf_config['action_on_error'] = 0; // 0 - continue; 1 - die
103
$pdf_config['creator'] = 'NEWS BASED ON FPDF v1.53';
104
$pdf_config['url'] = XOOPS_URL;
105
$pdf_config['mail'] = 'mailto:'.$xoopsConfig['adminmail'];
106
$pdf_config['slogan']=xoops_substr($myts->htmlspecialchars( $xoopsConfig['sitename'] ),0,30);
107
$pdf_config['scale'] = '0.8';
108
$pdf_config['dateformat'] = _DATESTRING;
109
$pdf_config['footerpage'] = _MD_PDF_PAGE;
110
111
// For local support sites
112
define('NEWS_PDF_FORUM', 'Forum');
113
define('NEWS_PDF_TOPIC', 'Topic');
114
define('NEWS_PDF_SUBJECT', 'Subject');
115
define('NEWS_PDF_AUTHOR', _POSTEDBY);
116
define('NEWS_PDF_DATE', _MD_POSTEDON);
117
118
// For more details, refer to: http://fpdf.org
119 View Code Duplication
class PDF_language extends PDF_Korean
0 ignored issues
show
Comprehensibility Best Practice introduced by
The type PDF_language has been defined more than once; this definition is ignored, only the first definition in fpdf/language/english.php (L119-155) is considered.

This check looks for classes that have been defined more than once.

If you can, we would recommend to use standard object-oriented programming techniques. For example, to avoid multiple types, it might make sense to create a common interface, and then multiple, different implementations for that interface.

This also has the side-effect of providing you with better IDE auto-completion, static analysis and also better OPCode caching from PHP.

Loading history...
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
120
{
121
  function PDF_language($orientation='P',$unit='mm',$format='A4')
0 ignored issues
show
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
122
  {
123
      //Call parent constructor
124
      $this->FPDF($orientation,$unit,$format);
125
      //Initialization
126
    $this->AddUHChwFont();
0 ignored issues
show
The method AddUHChwFont() does not seem to exist on object<PDF_language>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
127
  }
128
129
  function Error($msg)
0 ignored issues
show
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
130
  {
131
    global $pdf_config;
132
    if($pdf_config['action_on_error']){
133
      //Fatal error
134
      die('<B>FPDF error: </B>'.$msg);
135
    }
136
  }
137
138
  function encoding(&$text, $in_charset)
0 ignored issues
show
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
139
  {
140
    $out_charset = $GLOBALS['valid_pfd_charset'];
141
      if (empty($in_charset) || empty($out_charset) || !strcasecmp($out_charset, $in_charset)) return;
142
143
      if(is_array($text) && count($text)>0){
144
        foreach($text as $key=>$val){
145
          $this->_encoding($text[$key], $in_charset, $out_charset);
146
        }
147
      }else{
148
        $this->_encoding($text, $in_charset, $out_charset);
149
      }
150
  }
151
152
  function _encoding(&$text, $in_charset, $out_charset)
0 ignored issues
show
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
153
  {
154
    $xconv_handler = @xoops_getmodulehandler('xconv', 'xconv', true);
155
    if($xconv_handler &&
156
      $converted_text = @$xconv_handler->convert_encoding($text, $out_charset, $in_charset)
157
    ){
158
      $text = $converted_text;
159
160
      return;
161
    }
162
    if(XOOPS_USE_MULTIBYTES && function_exists('mb_convert_encoding')) $converted_text = @mb_convert_encoding($text, $out_charset, $in_charset);
163
    else
164
    if(function_exists('iconv')) $converted_text = @iconv($in_charset, $out_charset . '//TRANSLIT', $text);
165
    $text = empty($converted_text)?$text:$converted_text;
166
  }
167
}
168