Commit Graph

171 Commits

Author SHA1 Message Date
Matt Pass
3facbe2de6 If no filemtime value use time 2015-05-02 14:09:38 +01:00
Matt Pass
12e6bedf6d CodeMirror dir renamed to just that
Dropped version number so we can see cleaner commit changes in future
2015-04-25 15:12:47 +01:00
Matt Pass
797df35ffe Create config settings file on the fly
So we can update using PHP later
2015-04-25 10:13:45 +01:00
Andrey Grinenko
8f1cca087b session fixation fix - previous version did not let me in, because it regenerated session before even trying to start old one and check whether it is valid or not.
I've also added session regeneration on login, which is good practice to prevent session fixation.
2015-02-21 02:58:44 +03:00
Matt Pass
c322c501ac previousFiles updated to only available files
Avoids ICEcoder asking to open files that are no longer available.
2014-12-15 15:36:40 +00:00
Matt Pass
670e3c47a6 Don't match ICEcoder path to doc root use basename
The 2 x if conditions added a security measure to avoid path traversals,
should languageBase or languageUser ever be set to something malicious
such as (eg ../../../../../../../etc/passwd)

However, it meant that the ICEcoder dir and the doc root dir paths had
to both start the same, and so be in the same location really. It was
previously a benefit to have them possibly contain different paths, but
this security point restricts this.

We can remove these 2 if conditions however and simply wrap the 2 array
values with basename(), so we take only the trailing file name and so
avoid path traversal issues.
2014-11-27 20:48:28 +00:00
Matt Pass
77c0f61d7b Only update value if index.php
Causes file locking issues if allowed to be called from anywhere
Because we only call from index.php now, also need dirname(___FILE___)
to complete paths
2014-11-25 09:49:53 +00:00
Matt Pass
8d5715ebcd Update configCreateDate if 0 and 14 full days
configCreateDate set if 0 now on every load, not just save
14 full days setup (1296000 - 1 sec), so doesn't start by showing 13
days (and 23 hrs, 59 secs)
If configCreateDate == 0, $tRemaining is the $tPeriod
2014-11-21 16:40:32 +00:00
Matt Pass
edbe8af62f User language can be selected from settings screen
If there has been a change of language, set a bool flag for a reload
later
Save languageUser to file also on settings update
realpath checking on language file name also, dies if fails
2014-11-18 15:35:41 +00:00
Matt Pass
07117591e5 Can redirect to trial ended page if on login page
Would only redirect on fresh open otherwise
2014-11-18 13:23:20 +00:00
Matt Pass
429fab5c17 Establish trial time, % and days remaining 2014-11-17 13:00:22 +00:00
Matt Pass
5fe097a84a No longer console.log
We should indeed only output if index.php and top.iceRoot is updated
after a settings change in settings-update.php (top.docRoot only changes
if you manually change the file, in which case a reload is needed and
this is picked up again from scratch).
2014-11-13 14:33:47 +00:00
Matt Pass
ebf12f327f Only set top.docRoot and top.iceRoot from index.php
Avoids having something output to the browser in places where we don't
want it, such as the new file-control-xhr.php file. Temporary
console.log for now as reminder to finish checking this out.
2014-11-12 17:40:27 +00:00
Matt Pass
35d1b01727 Trial period & handling added 2014-11-04 12:58:08 +00:00
Matt Pass
eff7e7fa85 6 JS window.location fallbacks
On some servers the header request can be ignored, so have JS as a
fallback
2014-10-31 15:04:27 +00:00
Matt Pass
9ea459787e Polyfill added for array_replace_recursive
This is natively available in PHP 5.3+
2014-10-24 09:23:52 +01:00
Matt Pass
44aca5ad1b Need to use array_replace_recursive()
This is the function needed to overwrite $text array ontop of
$englishText, including nested arrays
2014-09-05 22:07:26 +01:00
Matt Pass
f96651b9e8 Load English first, then merge lang ontop
It's English ontop of English for now, but 2nd include can be changed in
the code here and soon to be set via the UI.
2014-08-21 14:30:43 +01:00
Matt Pass
ec05132fa8 Make array available in session
Used by files that don't load settings.php
2014-08-08 09:29:19 +01:00
Matt Pass
5de4cd657e Language system setup and English translations
Covering top level and login so far only
2014-08-06 09:26:50 +01:00
Matt Pass
a8168fed86 Include this lib file only once
Is called from headers.php also now, so don't want to error by calling
again (clashing function names etc)
2014-05-20 07:26:05 +01:00
RelaxedArcher
6a50c1ce2b Fixed an issue that caused registration to be always available while in multi-user mode 2014-05-10 02:30:22 +03:00
Matt Pass
bfea966a14 Replace on SCRIPT_FILENAME
By replacing on this rather than __FILE__, we have a full file path and
can actually exclude the current working folder
2014-01-16 14:15:34 +00:00
Matt Pass
58e7c5ec42 preg_replace to remove full path prefix
Use preg_replace to only replace the first instance on a full path to
make it local
Avoids str_replace replacing all instances in the string
2014-01-15 10:39:31 +00:00
Matt Pass
d42ea6f54b Establish the dir that ICEcoder is running from
Used to exclude from file manager and search results
2014-01-11 17:41:14 +00:00
Matt Pass
31aceb7226 Refactored and improved settings.php file
Moved huge chunks of isolated code to their own files
Reordered and improved remaining code
Lots of die messages added to stop code continuing after a header
location
!loginRequired now also setting loggedIn = true as demoMode does
Boot user to new login page instead of back to this page
loginRequired added to final elseif condition
Added 2 big notes re probably showing he login screen and continuing
with what we're doing
2014-01-11 15:48:23 +00:00
Matt Pass
0da7ca2e4d Change of security related headers & comment out
The X-CSP was stopping Firefox from working, complained about a CSP in
Emmet
Changed the security items, then found none were needed, so commented
out
2013-12-08 13:17:43 +00:00
Matt Pass
50d2dadea2 Added note for disabling XSS filter method 2013-09-26 18:15:22 +01:00
Matt Pass
bf755abbf4 Set a policy of allowing scripts on same domain
Chrome now has tighter rules via security auditorm this line needed to
allow x-frame script use
2013-09-26 11:55:54 +01:00
Matt Pass
0128499d73 Autocomplete setting added
Saved when updating settings
Also updated in current session
2013-09-17 09:15:33 +01:00
Matt Pass
330d668d07 Line breaks after plugins
Now laid out vertically rather than horizontally
2013-09-11 10:57:00 +01:00
Matt Pass
568cb08e4a Check if lib/settings.php exists first
Because we may include this file from a couple of dirs and I'd rather it
continued to be run from lib/settings.php. By doing it this way round,
we're ensuring this, as lib/lib/settings.php won't exist.
2013-09-03 08:10:21 +01:00
Matt Pass
1b7d647d60 Allow settings to be called from root or a dir
By doing this we don't end up with a lib/lib path issue
Used longhand if else statement instead of ternary for clarity
Also added die to stop it going any further and having a new header
location replace this one
2013-08-30 09:01:10 +01:00
Matt Pass
4df33254d0 Moved the placement of tagWrapperCommand
To fit in with placement on settings screen and match settings file
2013-08-11 16:05:34 +01:00
pushreset
65c77f7d93 Choose tag wrapper combination 2013-08-10 18:22:55 +02:00
Matt Pass
5ea3854043 Change info to refer to new location of setting 2013-07-16 17:32:22 +01:00
Matt Pass
d4de692822 Replace www. in settingsFile name
Means both www. and blank subdomains share the same file
2013-07-12 07:38:21 +01:00
Matt Pass
fdc5bc34fd Tweak to if condition to not convert UTF8
Otherwise we are UTF8 encoding the UTF8 encoding and special chars can
get messed up
2013-07-10 16:18:59 +01:00
Matt Pass
10a91df31c No longer needs script tag
It is called from within a script
2013-07-10 07:44:02 +01:00
Matt Pass
813d5f01dd Increase salt length to 12, handle line breaks
Increase salt from 9 to 12 chars to move along with technology
Replace all backslashes with 2. This means we escape PHP and then JS to
ensure we will maintain \n instead of ending up with a line break
2013-07-07 15:29:37 +01:00
Matt Pass
d3737f5a62 User settings carry version no & clear on upgrade
versionNo also added to user settings array
Check this against system and on mismatch, rename .old and reload to
create new settings file
2013-06-15 13:40:56 +01:00
Matt Pass
7bef57ca76 Hide errors, @session_start and if wrap function
Don't display errors, just silently log them
Don't produce warnings if we can't session_start due to headers already
being sent
Test if the mb_detect_encoding function exists before using
2013-06-11 08:37:27 +01:00
Matt Pass
eed8b29753 ICEcoder logo update and docRoot setting added
New ICEcoder logo added plus docRoot available as a setting in
config___settings.php
2013-06-05 16:14:36 +01:00
Matt Pass
aa2ed93d74 Load system and user settings files
$configSettings is a seperate file now, containing the array of settings
we have buried in this file
Renamed user template, so change of filename here
Also using $configUsersTemplate to be clearer about things
2013-06-04 18:03:32 +01:00
Matt Pass
9dd2221841 All variations of password now just password
To make things simpler, everything is now just called password rather
than accountPassword etc
settings.php also now gone back to checking for the existance of the
$_POST password rather than looking for a submit button named 'set
password'. This obviously wouldn't work as that's not the name of the
button on the settings screen, it's 'update'
2013-06-04 17:25:46 +01:00
Matt Pass
47cf80102c Run processes on events
On logout event, include that process
Settings template file is now config___template.php
Create new if statement for login success and fail, plus run processes
for each event
On new user setup, run that process
If multiUser, always show the checkUpdates box as we don't know if we're
setting up a new user or logging in, so have to assume it's a new user
and allow this setting to show
2013-05-31 20:25:44 +01:00
Matt Pass
d859075e97 multiUser is false by default 2013-05-31 10:39:08 +01:00
Matt Pass
d6c282a70a Multi user setup & login added
Session accountUsername is now just username
Settings filename now may contain the username if available from a post
or session var
setPWorLogin is now login by default, set password if we create a new
config file
Instead of the posted accountPassword value, we now look to the value of
the submit button and if it contains 'set password' or not
Set session username to the posted value on login or set password and
set to itself on every load
accountPassword form field now just password
Focus on the username or password field, depending on the 1st one shown
on page
Set the value of the submit button to 'set password / login' if
multiUser
2013-05-31 10:36:39 +01:00
Matt Pass
4865f6c87b Version 2.5 2013-05-29 14:49:47 +01:00
Matt Pass
33a354688a Begin setting up multiUser
For now tho this is hidden from view until the rest is set up
2013-05-28 19:07:51 +01:00