GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Issues (4873)

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.

plugins/phpwiki/include/PHPWikiService.class.php (2 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
 * Copyright (c) Enalean, 2015. All Rights Reserved.
4
 * Copyright 2005, STMicroelectronics
5
 *
6
 * Originally written by Manuel Vacelet
7
 *
8
 * This file is a part of Tuleap.
9
 *
10
 * Tuleap is free software; you can redistribute it and/or modify
11
 * it under the terms of the GNU General Public License as published by
12
 * the Free Software Foundation; either version 2 of the License, or
13
 * (at your option) any later version.
14
 *
15
 * Tuleap is distributed in the hope that it will be useful,
16
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18
 * GNU General Public License for more details.
19
 *
20
 * You should have received a copy of the GNU General Public License
21
 * along with Tuleap. If not, see <http://www.gnu.org/licenses/>.
22
 */
23
24
/**
25
 * Entry point of WikiService
26
 *
27
 * This class receive HTTP requests for Wiki Service.
28
 *
29
 * @package   WikiService
30
 * @copyright STMicroelectronics, 2005
31
 * @author    Manuel Vacelet <[email protected]>
32
 * @license   http://opensource.org/licenses/gpl-license.php GPL
33
 */
34
class PHPWikiService extends Controler {
35
  /* private Wiki*/ var $wiki;
36
37
  /**
38
   * Constructor
39
   */
40
  function PHPWikiService($id) {
41
      global $LANG, $is_wiki_page;
42
      
43
      //used so the search box will add the necessary element to the pop-up box
44
      $is_wiki_page = 1;
45
46
    /* 
47
     * Check given id 
48
     */
49
    $this->gid = (int) $id;
50
51
    if(empty($this->gid))
52
      exit_no_group();
53
54
    $pm = ProjectManager::instance();
55
    $go = $pm->getProject($this->gid);
56
    if(!$go) 
57
      exit_no_group();
58
59
    $this->wiki = new PHPWiki($this->gid);
60
    
61
    
62
    // Check access right
63
    $this->checkPermissions();
64
65
    // If Wiki for project doesn't exist, propose creation ... if user is project admin or wiki admin
66
    if(!$this->wiki->exist()) {
0 ignored issues
show
Bug Best Practice introduced by
The expression $this->wiki->exist() of type boolean|null is loosely compared to false; this is ambiguous if the boolean can be false. You might want to explicitly use !== null instead.

If an expression can have both false, and null as possible values. It is generally a good practice to always use strict comparison to clearly distinguish between those two values.

$a = canBeFalseAndNull();

// Instead of
if ( ! $a) { }

// Better use one of the explicit versions:
if ($a !== null) { }
if ($a !== false) { }
if ($a !== null && $a !== false) { }
Loading history...
67
      if((!user_ismember($this->gid, 'W2'))&&(!user_ismember($this->gid, 'A'))) {
68
	exit_wiki_empty();
69
      }
70
    }
71
72
    // Set language for phpWiki
73
    if ($this->wiki->getLanguage_id()) {
74
        define('DEFAULT_LANGUAGE', $this->wiki->getLanguage_id());
75
        $LANG = $this->wiki->getLanguage_id();
76
    }
77
  }
78
79
80
  /**
81
   * Check access permissions for wiki and wiki pages.
82
   *
83
   * Check restriction for:
84
   *  wiki: whole wiki can be restricted.
85
   *  wikipage: each page of the wiki can be restricted.
86
   */
87
  function checkPermissions() {
88
    // Check if user can access to whole wiki
89
    if(!$this->wiki->isAutorized(user_getid())) {
90
        $GLOBALS['Response']->addFeedback(
91
                                'error', 
92
                                $GLOBALS['Language']->getText(
93
                                                        'plugin_phpwiki_wikiservice',
94
                                                        'acces_denied_whole',
95
                                                        session_make_url("/project/memberlist.php?group_id=".$this->gid)
96
                                ),
97
                                CODENDI_PURIFIER_DISABLED
98
                            );
99
        exit_permission_denied();
100
    }
101
102
    // Check if user can access to selected page
103
    if(!empty($_REQUEST['pagename'])) {
104
      $wp = new PHPWikiPage($this->gid, $_REQUEST['pagename']);
105
      if(!$wp->isAutorized(user_getid())) {
106
        $GLOBALS['Response']->addFeedback(
107
                                'error', 
108
                                $GLOBALS['Language']->getText(
109
                                                        'plugin_phpwiki_wikiservice',
110
                                                        'acces_denied_page',
111
                                                        session_make_url("/project/memberlist.php?group_id=".$this->gid)
112
                                ),
113
                                CODENDI_PURIFIER_DISABLED
114
                            );
115
        exit_permission_denied();
116
      }
117
    }
118
  }
119
120
  /**
121
   * Bind http request with views and actions
122
   */
123
  function request() {
124
    if (!isset($this->view))
125
        $this->view = 'browse';
126
127
    if(!empty($_REQUEST['pagename'])) 
128
        $this->view = 'empty';
129
130
    if(isset($_REQUEST['format']) && 
131
       ($_REQUEST['format'] == 'rss') )
132
        $this->view = 'empty'; 
133
134
    if(isset($_REQUEST['pv']) && ($_REQUEST['pv'] == 1 || $_REQUEST['pv'] == 2)) 
135
        $this->view = 'empty'; 
136
137
    if(isset($_REQUEST['action'])) {
138
        if($_REQUEST['action'] == 'pdf') 
139
            $this->view = 'empty';
140
        
141
        if($_REQUEST['action'] == 'ziphtml') 
142
            $this->view = 'empty';
143
        
144
        if($_REQUEST['action'] == 'zip') 
145
            $this->view = 'empty';
146
        
147
        if($_REQUEST['action'] == 'add_temp_page')
148
            $this->action = 'add_temp_page';
149
150
        if($_REQUEST['action'] == 'setWikiPagePerms')
151
            $this->action = 'setWikiPagePerms';
152
    }
153
154
    if(isset($_REQUEST['view']) &&
155
       ($_REQUEST['view'] == 'browsePages'))
156
        $this->view = 'browsePages';
157
158
    // If Wiki for project doesn't exist, propose creation...
159
    if(!$this->wiki->exist()) {
0 ignored issues
show
Bug Best Practice introduced by
The expression $this->wiki->exist() of type boolean|null is loosely compared to false; this is ambiguous if the boolean can be false. You might want to explicitly use !== null instead.

If an expression can have both false, and null as possible values. It is generally a good practice to always use strict comparison to clearly distinguish between those two values.

$a = canBeFalseAndNull();

// Instead of
if ( ! $a) { }

// Better use one of the explicit versions:
if ($a !== null) { }
if ($a !== false) { }
if ($a !== null && $a !== false) { }
Loading history...
160
        if (!isset($_REQUEST['view']) || (isset($_REQUEST['view']) && $_REQUEST['view'] != 'doinstall'))
161
            $this->view='install';
162
        else $this->view='doinstall';
163
    }
164
165
  }
166
167
}
168
?>