Skip to content

Commit

Permalink
Merge branch 'craigk5n:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
bbannon authored Oct 2, 2023
2 parents 100e507 + f632671 commit 9df365c
Show file tree
Hide file tree
Showing 17 changed files with 37 additions and 16 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/docker-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,10 @@ jobs:
do
if [ $COUNTER -ge $KEEP_LAST_N_IMAGES ]
then
echo "Deleting tag $TAG"
curl -i -X DELETE -u $DOCKER_HUB_USERNAME:$DOCKER_HUB_PASSWORD https://hub.docker.com/v2/repositories/$DOCKER_HUB_REPO/tags/$TAG/
echo "The following tag should be deleted: $TAG"
# Commenting out the actual delete since dockerhub does not seem to support delete via curl :-(
# echo "Deleting tag $TAG"
# curl -i -X DELETE -u $DOCKER_HUB_USERNAME:$DOCKER_HUB_PASSWORD https://hub.docker.com/v2/repositories/$DOCKER_HUB_REPO/tags/$TAG/
else
echo "Keeping tag $TAG"
fi
Expand Down
2 changes: 1 addition & 1 deletion UPGRADING.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ <h1>WebCalendar Upgrading Notes</h1>
<table>
<tr>
<th>WebCalendar Version:</th>
<td>1.9.9</td>
<td>1.9.10</td>
</tr>
</table>
<p><span class="note">Important News:</span> A major improvement beginning with Version 1.1 is the addition of an automated installation script. This script will guide you through the installation process and help identify any problem areas that might prevent successful installation or operation of WebCalendar.
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "k5n/webcalendar",
"type": "project",
"description": "Multi-user web-based calendar app",
"version": "1.9.9",
"version": "1.9.10",
"homepage": "https://www.k5n.us/webcalendar/",
"authors": [
{
Expand Down
2 changes: 1 addition & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions includes/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,9 @@ function do_config()
];

// When changing PROGRAM VERSION, also change it in install/default_config.php
$PROGRAM_VERSION = 'v1.9.9';
$PROGRAM_VERSION = 'v1.9.10';
// Update PROGRAM_DATE with official release data
$PROGRAM_DATE = '12 Sep 2023';
$PROGRAM_DATE = '02 Oct 2023';

$PROGRAM_NAME = 'WebCalendar ' . "$PROGRAM_VERSION ($PROGRAM_DATE)";
$PROGRAM_URL = 'http://k5n.us/wp/webcalendar/';
Expand Down
3 changes: 3 additions & 0 deletions includes/menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,9 @@
$logout_url = $login_url . '&';
}
$logout_url .= 'action=logout';
if (empty($CSRF_PROTECTION) || $CSRF_PROTECTION != 'N') {
$logout_url .= '&amp;csrf_form_key=' . getFormKey();
}
// Should we use another application's login/logout pages?
if (substr($GLOBALS['user_inc'], 0, 9) == 'user-app-') {
global $app_login_page, $app_logout_page;
Expand Down
3 changes: 3 additions & 0 deletions includes/trailer.php
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,9 @@
$login_url .= '?return_path=' . $login_return_path;
$logout_url .= $login_url . '&action=logout';
}
if (empty($CSRF_PROTECTION) || $CSRF_PROTECTION != 'N') {
$logout_url .= '&amp;csrf_form_key=' . getFormKey();
}

// Should we use another application's login/logout pages?
if ( substr ( $GLOBALS['user_inc'], 0, 9 ) == 'user-app-' ) {
Expand Down
2 changes: 1 addition & 1 deletion install/default_config.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@
'USER_RSS_ENABLED' => 'N',
'USER_SEES_ONLY_HIS_GROUPS' => 'Y',
'USER_SORT_ORDER' => 'cal_lastname, cal_firstname',
'WEBCAL_PROGRAM_VERSION' => 'v1.9.9',
'WEBCAL_PROGRAM_VERSION' => 'v1.9.10',
'WEEK_START' => '0',
'WEEKEND_START' => '6',
'WEEKENDBG' => '#d0d0d0',
Expand Down
2 changes: 1 addition & 1 deletion install/sql/upgrade-db2.sql
Original file line number Diff line number Diff line change
Expand Up @@ -301,4 +301,4 @@ ALTER TABLE webcal_user MODIFY cal_passwd VARCHAR(255);
update webcal_entry_categories SET cat_owner = '' WHERE cat_owner IS NULL;
ALTER TABLE webcal_entry_categories ADD PRIMARY KEY (cal_id, cat_id, cat_order, cat_owner);
/*upgrade_v1.9.7*/
/*upgrade_v1.9.9*/
/*upgrade_v1.9.10*/
2 changes: 1 addition & 1 deletion install/sql/upgrade-ibase.sql
Original file line number Diff line number Diff line change
Expand Up @@ -316,4 +316,4 @@ ALTER TABLE webcal_user MODIFY cal_passwd VARCHAR(255);
update webcal_entry_categories SET cat_owner = '' WHERE cat_owner IS NULL;
ALTER TABLE webcal_entry_categories ADD PRIMARY KEY (cal_id, cat_id, cat_order, cat_owner);
/*upgrade_v1.9.7*/
/*upgrade_v1.9.9*/
/*upgrade_v1.9.10*/
2 changes: 1 addition & 1 deletion install/sql/upgrade-mssql.sql
Original file line number Diff line number Diff line change
Expand Up @@ -302,4 +302,4 @@ ALTER TABLE webcal_user MODIFY cal_passwd VARCHAR(255);
update webcal_entry_categories SET cat_owner = '' WHERE cat_owner IS NULL;
ALTER TABLE webcal_entry_categories ADD PRIMARY KEY (cal_id, cat_id, cat_order, cat_owner);
/*upgrade_v1.9.7*/
/*upgrade_v1.9.9*/
/*upgrade_v1.9.10*/
2 changes: 1 addition & 1 deletion install/sql/upgrade-mysql.sql
Original file line number Diff line number Diff line change
Expand Up @@ -271,4 +271,4 @@ ALTER TABLE webcal_user MODIFY cal_passwd VARCHAR(255);
update webcal_entry_categories SET cat_owner = '' WHERE cat_owner IS NULL;
ALTER TABLE webcal_entry_categories ADD PRIMARY KEY (cal_id, cat_id, cat_order, cat_owner);
/*upgrade_v1.9.6*/
/*upgrade_v1.9.9*/
/*upgrade_v1.9.10*/
2 changes: 1 addition & 1 deletion install/sql/upgrade-oracle.sql
Original file line number Diff line number Diff line change
Expand Up @@ -299,4 +299,4 @@ ALTER TABLE webcal_user MODIFY cal_passwd VARCHAR(255);
update webcal_entry_categories SET cat_owner = '' WHERE cat_owner IS NULL;
ALTER TABLE webcal_entry_categories ADD PRIMARY KEY (cal_id, cat_id, cat_order, cat_owner);
/*upgrade_v1.9.7*/
/*upgrade_v1.9.9*/
/*upgrade_v1.9.10*/
2 changes: 1 addition & 1 deletion install/sql/upgrade-postgres.sql
Original file line number Diff line number Diff line change
Expand Up @@ -317,4 +317,4 @@ ALTER TABLE webcal_user MODIFY cal_passwd VARCHAR(255);
update webcal_entry_categories SET cat_owner = '' WHERE cat_owner IS NULL;
ALTER TABLE webcal_entry_categories ADD PRIMARY KEY (cal_id, cat_id, cat_order, cat_owner);
/*upgrade_v1.9.7*/
/*upgrade_v1.9.9*/
/*upgrade_v1.9.10*/
2 changes: 1 addition & 1 deletion install/sql/upgrade.sql
Original file line number Diff line number Diff line change
Expand Up @@ -617,4 +617,4 @@ ALTER TABLE webcal_user MODIFY cal_passwd VARCHAR(255);
update webcal_entry_categories SET cat_owner = '' WHERE cat_owner IS NULL;
ALTER TABLE webcal_entry_categories ADD PRIMARY KEY (cal_id, cat_id, cat_order, cat_owner);
/*upgrade_v1.9.7*/
/*upgrade_v1.9.9*/
/*upgrade_v1.9.10*/
2 changes: 1 addition & 1 deletion install/sql/upgrade_matrix.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
//Program Version for this release
$PROGRAM_VERSION = 'v1.9.9';
$PROGRAM_VERSION = 'v1.9.10';

//array element[0] = sql insertion testy
//array element[1] = sql delete to clean up
Expand Down
13 changes: 13 additions & 0 deletions login.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,19 @@
$logout = false;
$action = getGetValue('action');
if (!empty($action) && $action == 'logout') {
if (empty($CSRF_PROTECTION) || $CSRF_PROTECTION != 'N') {
if (empty($_REQUEST['csrf_form_key']) || empty($_SESSION['csrf_form_key'])) {
die_miserable_death (translate('Fatal Error') . ': '
. translate('Invalid form request'));
}
$formKey = $_REQUEST['csrf_form_key'];
if ($formKey == $_SESSION['csrf_form_key'] && !empty($_SESSION['csrf_form_key'])) {
// Okay to proceed
} else {
die_miserable_death ( translate ( 'Fatal Error' ) . ': '
. translate ( 'Invalid form request' ) );
}
}
$logout = true;
$return_path = '';
sendCookie('webcalendar_login', '', 0);
Expand Down

0 comments on commit 9df365c

Please sign in to comment.