Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prioritize for Project Planning #2

Closed
dummyusergit opened this issue Apr 22, 2014 · 16 comments
Closed

Prioritize for Project Planning #2

dummyusergit opened this issue Apr 22, 2014 · 16 comments

Comments

@dummyusergit
Copy link

Just installed the latest version in kali 1.0 to try it out. I created a risk and went to management review to approve the risk and set 'Consider for Project'. The problem is that under 'Prioritize for Project Planning' I cannot see the risk.

Installed version:
simplerisk-20140413-001.tgz
simplerisk-en-20140413-001.sql

@jsokol
Copy link
Member

jsokol commented Apr 22, 2014

I just tried on the demo instance at https://demo.simplerisk.it (user/user) and am not able to replicate this issue there. Can you please try with the same browser on the demo instance and see if you are seeing the same results or something different?

@dummyusergit
Copy link
Author

I've tried it on the demo server and it's working perfectly

@dummyusergit
Copy link
Author

I've installed it also on xampp for Windows and again the same problem. Furthermore, I had to append the require statement for config.php in other php files. I think that this failure to include the required file is a limitation of php in Windows...

@jsokol
Copy link
Member

jsokol commented Apr 22, 2014

OK, I think that rules out any sort of a browser-related issue. The majority of our testing has been on an up-to-date Ubuntu platform. I can't say that I have ever tried to run SimpleRisk on either Kali or XAMPP. Can you tell me what web server you were using (Apache?) as well as the version of PHP and all installed modules? That can be found by dropping "" into a file in a web directory and then hitting the web page. If I had to guess, I'd say that it's possibly an older version of PHP or that it's missing some module that exists in my development environment.

@dummyusergit
Copy link
Author

Most probably this must be the case. I'll try to install the latest version of xampp and try again. In the meantime I'll forward the php info, when I am back at my computer.

@dummyusergit
Copy link
Author

I tried with a newer xampp version and the problem persists. Here is the php/apache info, please tell me if anything more is needed:

PHP Version 5.4.7
Apache/2.4.3 (Win32) OpenSSL/1.0.1c PHP/5.4.7

core mod_win32 mpm_winnt http_core mod_so mod_access_compat mod_actions mod_alias mod_allowmethods mod_asis mod_auth_basic mod_authn_core mod_authn_file mod_authz_core mod_authz_groupfile mod_authz_host mod_authz_user mod_autoindex mod_cgi mod_dav_lock mod_dir mod_env mod_headers mod_include mod_info mod_isapi mod_log_config mod_cache_disk mod_mime mod_negotiation mod_proxy mod_proxy_ajp mod_rewrite mod_setenvif mod_ssl mod_status mod_php5

@dummyusergit
Copy link
Author

Installed newest xampp and the problem remains:

Apache/2.4.9 (Win32) OpenSSL/1.0.1g PHP/5.5.11

core mod_win32 mpm_winnt http_core mod_so mod_access_compat mod_actions mod_alias mod_allowmethods mod_asis mod_auth_basic mod_auth_digest mod_authn_core mod_authn_file mod_authz_core mod_authz_groupfile mod_authz_host mod_authz_user mod_autoindex mod_cgi mod_dav mod_dav_fs mod_dav_lock mod_dir mod_env mod_headers mod_include mod_info mod_isapi mod_log_config mod_cache_disk mod_mime mod_negotiation mod_proxy mod_proxy_ajp mod_rewrite mod_setenvif mod_socache_shmcb mod_ssl mod_status mod_version mod_php5

@dummyusergit
Copy link
Author

I noticed the following difference in the html code between the demo and xampp installation:

demo:

<div id="tabs">
<ul>
<li><a href="#tabs-0">Unassigned Risks</a></li>

xampp:

<div id="tabs">
<ul>
<li><a href="#tabs-1">Unassigned Risks</a></li>

is this tabs-0/1 the reason for the problem?

@jsokol
Copy link
Member

jsokol commented Apr 23, 2014

Can you check your apache error.log file to see if there's an error message when you hit that page? Based on the tabs issue that you posted, I'm wondering if there's maybe a difference in where the reference starts (0 vs 1). Maybe an error message would help to explain what's going on. I'm going to try to set up a VM environment where I can replicate what you have set up in order to see what is going on here. I can't promise that I will have a fix for it today, but I am definitely looking into your reported issue.

@jsokol
Copy link
Member

jsokol commented Apr 23, 2014

OK, I think I may have figured something out. It looks like when I install PHP on Ubuntu (my primary dev environment), nested file includes (via "require_once") actually works differently than in xampp or possibly Apache installed in ways other than via an apt-get like I typically do. For example, when I go to my index.php page in XAMPP, I kept seeing an error about not recognizing the CSP_ENABLED parameter even though this parameter is defined in the config.php file which is required in the functions.php which is required in the index.php. While there may be a configuration in the php.ini that could fix this, in my research I've come across some code-oriented fixes as well. In the example above, my issue was fixed by editing the functions.php file and using

require_once(__DIR__ . '/config.php'); 

instead of

require_once('config.php');

I'll work on fixing this up officially in the next release, but feel free to modify your installation to use this instead and see if that works. Once I did it, I was able to log in just fine and see my test project underneath the Unassigned Risks tab in project planning. Please give that a try and see if it works for you too.

@dummyusergit
Copy link
Author

I've tried it but it did not worked :(
I tried also to include the full path to the required file, but again with no luck...

@dummyusergit
Copy link
Author

the tabs numbering starting from 1 must be due to the fact that I created a new project and then I interchanged the order with the 'Unassigned Risks'

@jsokol
Copy link
Member

jsokol commented Apr 25, 2014

OK, I'm working on an updated version that will make these changes across all files and am hoping that it makes the difference for you. After making this change, SimpleRisk worked just fine in the XAMPP instance that I created. In terms of changing the order of "Unassigned Risks", I'm not sure how that's even possible as it's not supposed to show up as an item that you can change the order for. And if you installed fresh when moving from the old version of XAMPP to the new one, then why would that have happened again? Did you just upgrade XAMPP and not do a full uninstall and reinstall? In any case, my hope is that the ability to change it like you did is tied to functionality that exists because it's not properly handling the nested require statements and that by fixing it, it should fix the ability to even do that. Once I have a new version, since this doesn't require any database changes, I will provide you with a copy to test out in your environment. You will want to do a fresh load of the database though to clean up the old issue. Thanks!

@dummyusergit
Copy link
Author

Many thanks for your efforts 👍

I was keeping old installations to compare the effects of each change that I tried. I changed the order of projects in 3) Prioritize Projects.

Making the change you suggested in the functions.php indeed solved the errors about unknown parameters, but the problem stil remains :(

@jsokol
Copy link
Member

jsokol commented Apr 25, 2014

OK, if you somehow changed it to have the Unassigned Risks bucket as an ID of 1 instead of 0 (the default), then that pretty much explains the problem that you're seeing. It shouldn't be possible to re-arrange the order, but I'm guessing this other issue with not having the proper inclusion paths created a situation where it was. I would recommend dropping the database and re-loading the initial schema file. That should put it back to where it's supposed to be and the change that I gave you in the file should prevent it from happening again (I think). I am working on a new version that will make similar modifications to all of these "require" statements to ensure that it's not an issue going forward. In any case, you either need to reload the schema file (easiest) or run the following command on the database:

UPDATE `projects` SET `order`="0" WHERE `value`="0";

That should set it back to the first tab.

@dummyusergit
Copy link
Author

I run the following command on the database and the problem was solved:

UPDATE `projects` SET `value`="0" WHERE `order`="0";

Many thanks for your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants