Skip to content

Commit

Permalink
change DB IP storage fields to accommodate IPv6 addresses
Browse files Browse the repository at this point in the history
  • Loading branch information
ron4mac committed Jun 13, 2024
1 parent 45e4f2a commit 043269a
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 10 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @license GNU General Public License version 3 or later; see LICENSE
*
* CHANGELOG.txt
* @since 1.6.26
* @since 1.6.27
*/
Changelog
=========
Expand All @@ -20,6 +20,7 @@ Changelog
[S] = Security fix (issues that are related to security)
*********************************************

2024-06-12 [M,B] Change DB IP storage fields to accommodate IPv6 addresses {ron4mac}
2023-11-27 [B] Correct IPTC supplimental category parsing {ron4mac}
2023-11-11 [B] Correct design/coding error in user manager {ron4mac}
2023-04-21 [M] Prevent HTML5 upload initialization failure caused by cloudflare rocket-loader {ron4mac}
Expand Down
4 changes: 2 additions & 2 deletions include/cpg16x.files.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7984,14 +7984,14 @@
</element>
<element>
<fullpath>sql/schema.sql</fullpath>
<version>1.6.05</version>
<version>1.6.27</version>
<status>mandatory</status>
<permission>read</permission>
<hash>55f6cb6847c6a5cf04dd16ee74719083</hash>
</element>
<element>
<fullpath>sql/update.sql</fullpath>
<version>1.6.05</version>
<version>1.6.27</version>
<status>mandatory</status>
<permission>read</permission>
<hash>958b31ca2d39f50c2c73fdddf577a3cb</hash>
Expand Down
8 changes: 4 additions & 4 deletions sql/schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
## ************************
## v1.0 originally written by Gregory Demar
##
## @copyright Copyright (c) 2003-2018 Coppermine Dev Team
## @copyright Copyright (c) 2003-2024 Coppermine Dev Team
## @license GNU General Public License version 3 or later; see LICENSE
##
## ********************************************
## sql/schema.sql
## @since 1.6.05
## @since 1.6.27
## ********************************************

#
Expand Down Expand Up @@ -194,7 +194,7 @@ CREATE TABLE IF NOT EXISTS CPG_filetypes (
CREATE TABLE CPG_hit_stats (
`sid` int(11) NOT NULL auto_increment,
`pid` varchar(100) NOT NULL default '',
`ip` varchar(20) NOT NULL default '',
`ip` varchar(40) NOT NULL default '',
`search_phrase` varchar(255) NOT NULL default '',
`sdate` bigint(20) NOT NULL default '0',
`referer` text NOT NULL,
Expand Down Expand Up @@ -373,7 +373,7 @@ CREATE TABLE CPG_vote_stats (
`sid` int(11) NOT NULL auto_increment,
`pid` varchar(100) NOT NULL default '',
`rating` smallint(6) NOT NULL default '0',
`ip` varchar(20) NOT NULL default '',
`ip` varchar(40) NOT NULL default '',
`sdate` bigint(20) NOT NULL default '0',
`referer` text NOT NULL,
`browser` varchar(255) NOT NULL default '',
Expand Down
10 changes: 7 additions & 3 deletions sql/update.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
## ************************
## v1.0 originally written by Gregory Demar
##
## @copyright Copyright (c) 2003-2018 Coppermine Dev Team
## @copyright Copyright (c) 2003-2024 Coppermine Dev Team
## @license GNU General Public License version 3 or later; see LICENSE
##
## ********************************************
## sql/update.sql
## @since 1.6.05
## @since 1.6.27
## ********************************************

# The following line has to be removed when the moderator group feature will be re-enabled!
Expand Down Expand Up @@ -47,4 +47,8 @@ INSERT INTO CPG_config VALUES ('album_uploads_default', 'NO');
ALTER TABLE CPG_plugins ADD `enabled` TINYINT(1) NOT NULL DEFAULT '1' AFTER `name`;

INSERT INTO CPG_config VALUES ('last_updates_check', '1');
INSERT INTO CPG_config VALUES ('auto_orient_checked', '1');
INSERT INTO CPG_config VALUES ('auto_orient_checked', '1');

# Fix length of IP address storage to accommodate IPV6 addresses
ALTER TABLE CPG_hit_stats CHANGE `ip` `ip` VARCHAR(40);
ALTER TABLE CPG_vote_stats CHANGE `ip` `ip` VARCHAR(40);

0 comments on commit 043269a

Please sign in to comment.