Commit 61681411 authored by sambuca's avatar sambuca

Merge branch 'master' of git.linuxmce.org:linuxmce/linuxmce

parents 6b0fd9f1 c20633ff
......@@ -99,7 +99,7 @@ RunSQL "$Q"
Q="
UPDATE Orbiter
SET Regen=1, Modification_LastGen=0
SET Regen=1, Modification_LastGen='1970-01-01 00:00:00'
WHERE PK_Orbiter IN ($OrbiterIDs)
"
RunSQL "$Q"
......@@ -35,6 +35,7 @@ if ! BlacklistConfFiles '/etc/dhcp/dhcpd.conf' ;then
fi
/usr/pluto/bin/PlutoDHCP >/etc/dhcp/dhcpd.conf
touch /etc/dhcp/dhcpd-extra.conf
service isc-dhcp-server restart
service isc-dhcp-server stop
service isc-dhcp-server start
fi
Unlock "PlutoDHCP" "PlutoDHCP_config"
......@@ -986,7 +986,15 @@ fi
$(RunSQL "$Q")
fi
fi
#DROP UPNP port 1900 udp FROM external interface:
Q="SELECT Matchname, IntIF, SourceIP, Ruletype FROM Firewall WHERE IntIf='$ExtIf' AND SourcePort='1900' AND RuleType='input' ORDER BY PK_Firewall"
R=$(RunSQL "$Q")
if ! [ "$R" ]; then
Q="INSERT INTO Firewall (Place, IntIF, Protocol, SourcePort RuleType, RPolicy, Description) VALUES ('2', '$ExtIf', 'udp-ipv4', '1900', 'input', 'DROP', 'Block UPNP (udp 1900) from External Network')"
$(RunSQL "$Q")
fi
#Local Network
Q="SELECT Matchname, IntIF, SourceIP, Ruletype FROM Firewall WHERE IntIf='$IntIf' AND SourceIP='$IntNet/$IntBitmask' AND RuleType='input' ORDER BY PK_Firewall"
R=$(RunSQL "$Q")
......
......@@ -46,15 +46,19 @@ option pxelinux.configfile code 209 = text;
option pxelinux.pathprefix code 210 = text;
option pxelinux.reboottime code 211 = unsigned integer 32;
class "rpi_pxe" {
match if substring (hardware, 1, 3) = B8:27:EB;
# "Raspberry Pi Boot"
option vendor-encapsulated-options
06:01:03:0A:04:00:50:58:45:09:14:00:00:11:52:61:73:70:62:65:72:72:79:20:50:69:20:42:6F:6F:74:FF;
}
subnet %INTERNAL_SUBNET% netmask %INTERNAL_SUBNET_MASK% {
next-server %CORE_INTERNAL_ADDRESS%;
filename "/tftpboot/pxelinux.0";
option pxelinux.reboottime = 30;
# "Raspberry Pi Boot"
option vendor-encapsulated-options
06:01:03:0A:04:00:50:58:45:09:14:00:00:11:52:61:73:70:62:65:72:72:79:20:50:69:20:42:6F:6F:74:FF;
default-lease-time 86400;
max-lease-time 604800;
%DYNAMIC_IP_RANGE%
......
......@@ -6,12 +6,24 @@ require "/usr/pluto/bin/config_ops.pl";
# We try the regular LinuxMCE/Pluto credentials. If they fail, we try a local connection
$db = DBI->connect(&read_pluto_cred()) or $db = DBI->connect("DBI:mysql:") or die "Couldn't connect to database: $DBI::errstr\n";
@databases = ("pluto_main","pluto_media","pluto_telecom","asterisk","asteriskcdrdb","mythconverg","pluto_mediatomb","pluto_myth","pluto_security","pluto_telecom","pluto_vdr");
#@databases = ("pluto_main","pluto_media","pluto_telecom","asterisk","asteriskcdrdb","mythconverg","pluto_mediatomb","pluto_myth","pluto_security","pluto_telecom","pluto_vdr");
@databases = ("asterisk","asteriskcdrdb","mythconverg","pluto_mediatomb","pluto_vdr");
# fix calldate in asterisk.cdr, sqlCVS takes care of lmce databases
$sql = "UPDATE asterisk.cdr set calldate='1970-01-01 00:00:00' WHERE calldate=0;";
$st = $db->prepare($sql) or die "Error in prepare $sql\n";
$st->execute() or die "Error on execute $sql\n";
$sql = "ALTER TABLE asterisk.cdr MODIFY calldate datetime NULL DEFAULT NULL;";
$st = $db->prepare($sql) or die "Error in prepare $sql\n";
$st->execute() or die "Error on execute $sql\n";
$sql = "UPDATE asterisk.cdr set calldate=NULL WHERE calldate=0 OR calldate='1970-01-01 00:00:00';";
$st = $db->prepare($sql) or die "Error in prepare $sql\n";
$st->execute() or die "Error on execute $sql\n";
foreach $dbname (@databases) {
# Select all tbles that don't have utf8_general_ci as there collation
$sql = "SELECT TABLE_NAME FROM information_schema.TABLES Where TABLE_SCHEMA = '$dbname' AND TABLE_NAME != 'Schema' AND TABLE_COLLATION != 'utf8_general_ci';";
# print "$sql\n";
# print "$sql\n";
$st = $db->prepare($sql) or die "Error in prepare $sql\n";
$st->execute() or die "Error on execute $sql\n";
$first = 1;
......@@ -30,7 +42,7 @@ foreach $dbname (@databases) {
}
$st->finish();
# Select all columns that have a specific character set, and reset them to default
# Select all columns that have a specific character set, and reset them to default
$sql_column = "SELECT TABLE_NAME,COLUMN_NAME, COLUMN_TYPE, IS_NULLABLE, COLUMN_DEFAULT, COLUMN_KEY FROM information_schema.COLUMNS where TABLE_SCHEMA = '$dbname' ";
$sql_column .= " AND (DATA_TYPE = 'varchar' OR DATA_TYPE = 'text' OR DATA_TYPE = 'char' OR DATA_TYPE = 'longtext') ";
$sql_column .= " AND CHARACTER_SET_NAME IS NOT NULL";
......
......@@ -1351,7 +1351,7 @@ class DataGridTable *Media_Plugin::MediaSearchAutoCompl( string GridID, string P
"ORDER BY Name limit 30";
*/
SQL =
"select DISTINCT PK_Attribute, IF(FK_AttributeType IN (2,3,13,57), IF(Name LIKE 'the %', CONCAT(SUBSTR(Name, 5), ', The'), Name), Name ) AS Name, Description, FK_Picture FROM Attribute "
"select DISTINCT PK_Attribute, IF(Attribute.FK_AttributeType IN (2,3,13,57), IF(Name LIKE 'the %', CONCAT(SUBSTR(Name, 5), ', The'), Name), Name ) AS Name, Description, FK_Picture FROM Attribute "
"JOIN AttributeType ON Attribute.FK_AttributeType=PK_AttributeType "
"JOIN MediaType_AttributeType ON MediaType_AttributeType.FK_AttributeType=PK_AttributeType "
"LEFT JOIN Picture_Attribute ON FK_Attribute=PK_Attribute "
......
......@@ -7,7 +7,7 @@ echo 'DELETE FROM CachedScreens;' | mysql pluto_main 2>/dev/null || err=$?; :
if [[ "$err" = "0" ]] ; then
echo 'DELETE FROM CachedScreens;' | mysql pluto_main || /bin/true
echo 'UPDATE Device JOIN DeviceTemplate ON FK_DeviceTemplate=PK_DeviceTemplate JOIN DeviceCategory ON FK_DeviceCategory=PK_DeviceCategory SET NeedConfigure=1 WHERE FK_DeviceCategory=5 OR FK_DeviceCategory_Parent=5;' | mysql pluto_main || /bin/true
echo 'UPDATE Orbiter set Modification_LastGen=0,Regen=1,RegenInProgress=0;' | mysql pluto_main || /bin/true
echo 'UPDATE Orbiter set Modification_LastGen="1970-01-01 00:00:00",Regen=1,RegenInProgress=0;' | mysql pluto_main || /bin/true
# Disable OrbiterGen for m/d's since as of .28 it's done on the core
echo 'UPDATE Device_StartupScript JOIN Device on FK_Device=PK_Device JOIN DeviceTemplate on FK_DeviceTemplate=PK_DeviceTemplate SET Enabled=0 WHERE FK_DeviceCategory=8 AND FK_Device_ControlledVia IS NULL AND FK_StartupScript=27' | mysql pluto_main || /bin/true
......
......@@ -2429,7 +2429,7 @@ class DataGridTable *Telecom_Plugin::SpeedDialGrid(string GridID,string Parms,vo
sql_buff += " JOIN CommandGroup_Command ON CommandGroup_Command.FK_CommandGroup=PK_CommandGroup";
sql_buff += " JOIN CommandGroup_Command_CommandParameter ON FK_CommandGroup_Command=PK_CommandGroup_Command";
sql_buff += " JOIN CommandGroup_Room ON CommandGroup_Room.FK_CommandGroup=PK_CommandGroup";
sql_buff += " WHERE AutoGeneratedDate=0";
sql_buff += " WHERE AutoGeneratedDate IS NULL"; // =0
sql_buff += " AND FK_Array="+StringUtils::itos(ARRAY_Communication_Scenarios_CONST);
sql_buff += " AND FK_Room="+room;
sql_buff += " ORDER BY PK_CommandGroup,FK_CommandParameter";
......
......@@ -283,6 +283,7 @@ MD_System_Level_Prep () {
#deb http://deb.linuxmce.org/ $TARGET_RELEASE $TARGET_REPO_NAME
deb $TARGET_REPO $TARGET_RELEASE main restricted universe multiverse
deb $TARGET_REPO $TARGET_RELEASE-updates main restricted universe multiverse
deb $TARGET_REPO $TARGET_RELEASE-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu/ $TARGET_RELEASE-security main restricted universe multiverse
EOF
;;
......
......@@ -48,8 +48,13 @@ function setup_tftp_boot_rpi
# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1
disable_overscan=1
gpu_mem=128
config_hdmi_boost=4
hdmi_force_hotplug=1
lcd_rotate=2
gpu_mem=128
# Enable audio (loads snd_bcm2835)
dtparam=audio=on
EEOF
}
......@@ -167,7 +172,7 @@ function setup_tftp_boot
chmod +r /tftpboot/${Moon_DeviceID}/initrd.img
case $Moon_DistroID in
$DD_DISTRO_Raspbian_Wheezy)
$DD_DISTRO_Raspbian_Wheezy|$DD_DISTRO_Raspbian_Jessie)
nfsroot="${IntIP}:/usr/pluto/diskless/${Moon_DeviceID}"
initrd=""
;;
......
......@@ -26,6 +26,7 @@ cat <<-'EOF' >"${Parm_RootLocation}/${File}"
### END INIT INFO #
DEVICEDATA_DISTRO_Raspbian_Wheezy_CONST=19
DEVICEDATA_DISTRO_Raspbian_Jessie_CONST=22
raspbian() {
trap 'update-rc.d -f firstrun remove' EXIT
......@@ -115,7 +116,7 @@ cat <<-'EOF' >"${Parm_RootLocation}/${File}"
. /usr/pluto/bin/Config_Ops.sh
case "$PK_Distro" in
"$DEVICEDATA_DISTRO_Raspbian_Wheezy_CONST")
$DEVICEDATA_DISTRO_Raspbian_Wheezy_CONST|$DEVICEDATA_DISTRO_Raspbian_Jessie_CONST)
raspbian
err=$?
;;
......
......@@ -618,17 +618,29 @@ void TagFileHandler::GetTagInfo(string sFilename, map<int, std::vector<string> >
sProperty = StringUtils::TrimSpaces(sProperty);
std::vector<string> vsProperties;
if ( (i->first == "ALBUMARTIST") || (i->first == "ALBUM ARTIST") || (i->first == "ENSEMBLE") )
if ( (i->first == "ALBUMARTIST") || (i->first == "ALBUM ARTIST") || (i->first == "ALBUMARTISTSORT") )
{
stov( sProperty, vsProperties, "/;" );
for ( std::vector<string>::iterator itProperty = vsProperties.begin(); itProperty != vsProperties.end(); ++itProperty )
mapAttributes[ATTRIBUTETYPE_Album_Artist_CONST].push_back( *itProperty );
if ( sProperty == "AC/DC" ) {
mapAttributes[ATTRIBUTETYPE_Album_Artist_CONST].push_back( sProperty );
}
else
{
stov( sProperty, vsProperties, "/;" );
for ( std::vector<string>::iterator itProperty = vsProperties.begin(); itProperty != vsProperties.end(); ++itProperty )
mapAttributes[ATTRIBUTETYPE_Album_Artist_CONST].push_back( *itProperty );
}
}
else if ( i->first == "ARTIST" )
{
stov( sProperty, vsProperties, "/;" );
for ( std::vector<string>::iterator itProperty = vsProperties.begin(); itProperty != vsProperties.end(); ++itProperty )
mapAttributes[ATTRIBUTETYPE_Performer_CONST].push_back( *itProperty );
if ( sProperty == "AC/DC" ) {
mapAttributes[ATTRIBUTETYPE_Performer_CONST].push_back( sProperty );
}
else
{
stov( sProperty, vsProperties, "/;" );
for ( std::vector<string>::iterator itProperty = vsProperties.begin(); itProperty != vsProperties.end(); ++itProperty )
mapAttributes[ATTRIBUTETYPE_Performer_CONST].push_back( *itProperty );
}
}
else if ( (i->first == "TITLE") && mapAttributes[ATTRIBUTETYPE_Title_CONST].empty() )
{
......@@ -872,6 +884,7 @@ void TagFileHandler::SetTagInfo(string sFilename, const map<int, std::vector<str
if ( !vsParameters.empty() )
{
InsertTagValues(f, string("ALBUMARTIST"), vsParameters );
InsertTagValues(f, string("ALBUMARTISTSORT"), vsParameters );
string sParameters = vtos( vsParameters, ';' );
// cout << "SetTagInfo - set Album Artist to: " << String(sParameters, String::UTF8).to8Bit(true) << endl;
......@@ -1041,6 +1054,7 @@ void TagFileHandler::RemoveTag(string sFilename, int nTagType, string sValue)
RemoveTagValue(f, "ALBUMARTIST", sValue);
RemoveTagValue(f, "ALBUM ARTIST", sValue);
RemoveTagValue(f, "ENSEMBLE", sValue);
RemoveTagValue(f, "ALBUMARTISTSORT", sValue);
break;
case ATTRIBUTETYPE_Performer_CONST:
......
......@@ -36,7 +36,7 @@ int main(int argc, char *argv[]) //main loop
metaDataDB.appPath=argv[0];
cout << "Media Autotagger v1.5 - Scan Start" << qPrintable(scanStart.toString ()) << endl;
cout << "Media Autotagger v1.6 - Scan Start" << qPrintable(scanStart.toString ()) << endl;
if(argc == 1) //no arguments, setting to hardcoded default and looking up file id.
{
startingDirectory = metaDataDB.findHome("/home/public/data/videos");
......@@ -212,7 +212,7 @@ int main(int argc, char *argv[]) //main loop
int mType;
int mediaSubType = metaDataDB.findMediaType(db_File_ID);
if(mediaSubType != -1)
if(mediaSubType > 0)
{
mType = mediaSubType;
cout << "Found Overriding Media Sub Type::"<< mType << endl;
......
......@@ -34,10 +34,18 @@ if ! BlacklistConfFiles "$MyCnf" ;then
bind-address=0.0.0.0
query_cache_limit=16M
query_cache_size=128M
secure-file-priv = ""
EOF
Q="GRANT ALL PRIVILEGES ON pluto_main.* to 'root'@'127.0.0.1';"
mysql $MYSQL_DB_CRED -e "$Q"
Q="GRANT FILE, SHOW DATABASES ON *.* TO 'asteriskuser'@'127.0.0.1';"
mysql $MYSQL_DB_CRED -e "$Q"
Q="GRANT FILE, SHOW DATABASES ON *.* TO 'asteriskuser'@'localhost';"
mysql $MYSQL_DB_CRED -e "$Q"
Q="FLUSH PRIVILEGES;"
mysql $MYSQL_DB_CRED -e "$Q"
......
......@@ -3,7 +3,7 @@ echo
/usr/pluto/bin/Debug_LogKernelModules.sh "$0" || :
PROCESS="upgrade"
# Check if we have an existing install, by verifying the DeviceTemplate table exists
mysql $MYSQL_DB_CRED pluto_security -e "Select 1"||PROCESS="install"
mysql $MYSQL_DB_CRED pluto_security -e "Select * From AlertType Limit 0,1"||PROCESS="install"
if [ $PROCESS = "install" ]; then
(
cd /usr/pluto/database
......@@ -21,4 +21,12 @@ if [ $PROCESS = "install" ]; then
Q="FLUSH PRIVILEGES;"
mysql $MYSQL_DB_CRED -e "$Q"
fi
if [ $PROCESS = "upgrade" ]; then
echo
echo Updating system database using sqlCVS
echo Please be patient...
## FIXME - schema.linuxmce.org is hard coded
/usr/pluto/bin/sqlCVS -R 6999 -H schema.linuxmce.org $PLUTO_DB_CRED -n -d anonymous -U anonymous~nopass -D pluto_security -r security -A -e update || exit $?
fi
......@@ -44,7 +44,7 @@ if [ $PROCESS = "upgrade" ]; then
/usr/pluto/bin/sqlCVS -R 3999 -H schema.linuxmce.org $PLUTO_DB_CRED -n -d anonymous -U anonymous~nopass -D $MySqlDBName -r constants,dce,designer,document,ir,website -A -e update || exit $?
fi
# Make sure Text_LS has the correct character set (UTF-8)
/usr/bin/perl /usr/pluto/bin/update2utf8.pl
/usr/bin/perl /usr/pluto/bin/update2utf8.pl || :
# update quick start icons
/bin/bash /usr/pluto/bin/UpdateQuickStartIcons.sh || /bin/true
......
......@@ -22,4 +22,11 @@ if [ $PROCESS = "install" ]; then
Q="FLUSH PRIVILEGES;"
mysql $MYSQL_DB_CRED -e "$Q"
fi
if [ $PROCESS = "upgrade" ]; then
echo
echo Updating media database using sqlCVS
echo Please be patient...
## FIXME - schema.linuxmce.org is hard coded
/usr/pluto/bin/sqlCVS -R 7999 -H schema.linuxmce.org $PLUTO_DB_CRED -n -d anonymous -U anonymous~nopass -D pluto_telecom -r telecom -A -e update || exit $?
fi
......@@ -53,7 +53,7 @@ case "$TARGET_RELEASE" in
TARGET_DISTRO_ID=$DEVICEDATA_DISTRO_Ubuntu_Trusty_CONST
TARGET_REPO_DISTRO_SRC=24
TARGET_REPO_LMCE_SRC=25
TARGET_LTS_HES="-lts-utopic" ;;
TARGET_LTS_HES="-lts-xenial" ;;
xenial)
TARGET_DISTRO_ID=$DEVICEDATA_DISTRO_Ubuntu_Xenial_CONST
TARGET_REPO_DISTRO_SRC=24
......
lmce-asterisk (0+0.3.6-1) unstable; urgency=low
* updates for mysql >v5.5 datetime/timestamp handling
-- phenigma <phenigma@linuxmce.org> Mon, 27 Sep 2016 20:08:00 -0500
lmce-asterisk (0+0.3.5-1) unstable; urgency=low
* update configs for chan_sccp-v4.2
......
......@@ -19,6 +19,7 @@ if [[ "$1" == configure ]]; then
mysql -f -h "$MySqlHost" -u "$MySqlUser" $PassParm -e "use asterisk; ALTER TABLE phonelines ADD dtmfmode VARCHAR(10) NOT NULL DEFAULT 'auto' AFTER protocol" 2>>/dev/null
mysql -f -h "$MySqlHost" -u "$MySqlUser" $PassParm -e "use asterisk; ALTER TABLE extensions MODIFY appdata VARCHAR(150);" 2>>/dev/null
mysql -f -h "$MySqlHost" -u "$MySqlUser" $PassParm -e "use asterisk; ALTER TABLE sip_devices CHANGE qualify qualify CHAR(5) NULL DEFAULT 'no'" 2>>/dev/null
mysql -f -h "$MySqlHost" -u "$MySqlUser" $PassParm -e "use asterisk; ALTER TABLE cdr MODIFY calldate datetime NULL DEFAULT NULL;" 2>>/dev/null
fi
# recreate asterisk database (except tables which contains user data)
......
......@@ -2,6 +2,7 @@
* Create LinuxMCE asterisk database
* and realtime tables
*
* v0.4 - 27/09/2016 - phenigma - updates for mysql >v5.5 datetime/timestamp changes
* v0.3 - 16/11/2015 - phenigma - updates for chan_sccp-v4.2
* v0.2 - 15/04/2012 - foxi352 - removed asteriskcdrdb and created cdr table in asterisk db
* v0.1 - 22/09/2011 - foxi352 - initial version
......@@ -376,7 +377,7 @@ CREATE TABLE IF NOT EXISTS `fax_list` (
-- Table for calls details records (cdr)
--
CREATE TABLE IF NOT EXISTS `cdr` (
`calldate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`calldate` datetime DEFAULT NULL,
`clid` varchar(80) NOT NULL DEFAULT '',
`src` varchar(80) NOT NULL DEFAULT '',
`dst` varchar(80) NOT NULL DEFAULT '',
......
-- MySQL dump 10.13 Distrib 5.6.31, for debian-linux-gnu (x86_64)
--
-- Host: localhost Database: lmce_oauth2_db
-- ------------------------------------------------------
-- Server version 5.6.31-0ubuntu0.15.10.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `oauth_access_tokens`
--
DROP TABLE IF EXISTS `oauth_access_tokens`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `oauth_access_tokens` (
`access_token` varchar(40) NOT NULL,
`client_id` varchar(80) NOT NULL,
`user_id` varchar(255) DEFAULT NULL,
`expires` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`scope` varchar(2000) DEFAULT NULL,
PRIMARY KEY (`access_token`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `oauth_access_tokens`
--
LOCK TABLES `oauth_access_tokens` WRITE;
/*!40000 ALTER TABLE `oauth_access_tokens` DISABLE KEYS */;
/*!40000 ALTER TABLE `oauth_access_tokens` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `oauth_authorization_codes`
--
DROP TABLE IF EXISTS `oauth_authorization_codes`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `oauth_authorization_codes` (
`authorization_code` varchar(40) NOT NULL,
`client_id` varchar(80) NOT NULL,
`user_id` varchar(255) DEFAULT NULL,
`redirect_uri` varchar(2000) DEFAULT NULL,
`expires` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`scope` varchar(2000) DEFAULT NULL,
PRIMARY KEY (`authorization_code`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `oauth_authorization_codes`
--
LOCK TABLES `oauth_authorization_codes` WRITE;
/*!40000 ALTER TABLE `oauth_authorization_codes` DISABLE KEYS */;
/*!40000 ALTER TABLE `oauth_authorization_codes` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `oauth_clients`
--
DROP TABLE IF EXISTS `oauth_clients`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `oauth_clients` (
`client_id` varchar(80) NOT NULL,
`client_secret` varchar(80) DEFAULT NULL,
`redirect_uri` varchar(2000) NOT NULL,
`grant_types` varchar(80) DEFAULT NULL,
`scope` varchar(100) DEFAULT NULL,
`user_id` varchar(80) DEFAULT NULL,
PRIMARY KEY (`client_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `oauth_clients`
--
LOCK TABLES `oauth_clients` WRITE;
/*!40000 ALTER TABLE `oauth_clients` DISABLE KEYS */;
/*!40000 ALTER TABLE `oauth_clients` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `oauth_jwt`
--
DROP TABLE IF EXISTS `oauth_jwt`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `oauth_jwt` (
`client_id` varchar(80) NOT NULL,
`subject` varchar(80) DEFAULT NULL,
`public_key` varchar(2000) DEFAULT NULL,
PRIMARY KEY (`client_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `oauth_jwt`
--
LOCK TABLES `oauth_jwt` WRITE;
/*!40000 ALTER TABLE `oauth_jwt` DISABLE KEYS */;
/*!40000 ALTER TABLE `oauth_jwt` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `oauth_refresh_tokens`
--
DROP TABLE IF EXISTS `oauth_refresh_tokens`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `oauth_refresh_tokens` (
`refresh_token` varchar(40) NOT NULL,
`client_id` varchar(80) NOT NULL,
`user_id` varchar(255) DEFAULT NULL,
`expires` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`scope` varchar(2000) DEFAULT NULL,
PRIMARY KEY (`refresh_token`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `oauth_refresh_tokens`
--
LOCK TABLES `oauth_refresh_tokens` WRITE;
/*!40000 ALTER TABLE `oauth_refresh_tokens` DISABLE KEYS */;
/*!40000 ALTER TABLE `oauth_refresh_tokens` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `oauth_scopes`
--
DROP TABLE IF EXISTS `oauth_scopes`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `oauth_scopes` (
`scope` text,
`is_default` tinyint(1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `oauth_scopes`
--
LOCK TABLES `oauth_scopes` WRITE;
/*!40000 ALTER TABLE `oauth_scopes` DISABLE KEYS */;
/*!40000 ALTER TABLE `oauth_scopes` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `oauth_users`
--
DROP TABLE IF EXISTS `oauth_users`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `oauth_users` (
`username` varchar(255) NOT NULL,
`password` varchar(2000) DEFAULT NULL,
`first_name` varchar(255) DEFAULT NULL,
`last_name` varchar(255) DEFAULT NULL,
PRIMARY KEY (`username`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `oauth_users`
--
LOCK TABLES `oauth_users` WRITE;
/*!40000 ALTER TABLE `oauth_users` DISABLE KEYS */;
/*!40000 ALTER TABLE `oauth_users` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2016-11-22 13:40:07
#!/bin/bash
mysql lmce_oauth2_db -e "show tables;" >/dev/null 2>/dev/null
RET="$?"
if [[ "$RET" != "0" ]]; then
mysql -e "create database lmce_oauth2_db"
mysql lmce_oauth2_db < /usr/pluto/database/lmce_oauth2_db.sql
fi
# Test Files #
test/config/test.sqlite
vendor
composer.lock
.idea
language: php
sudo: false
php:
- 5.3
- 5.4
- 5.5
- 5.6
- hhvm
env:
global:
- SKIP_MONGO_TESTS=1
- secure: Bc5ZqvZ1YYpoPZNNuU2eCB8DS6vBYrAdfBtTenBs5NSxzb+Vjven4kWakbzaMvZjb/Ib7Uph7DGuOtJXpmxnvBXPLd707LZ89oFWN/yqQlZKCcm8iErvJCB5XL+/ONHj2iPdR242HJweMcat6bMCwbVWoNDidjtWMH0U2mYFy3M=
- secure: R3bXlymyFiY2k2jf7+fv/J8i34wtXTkmD4mCr5Ps/U+vn9axm2VtvR2Nj+r7LbRjn61gzFE/xIVjYft/wOyBOYwysrfriydrnRVS0owh6y+7EyOyQWbRX11vVQMf8o31QCQE5BY58V5AJZW3MjoOL0FVlTgySJiJvdw6Pv18v+E=
services:
- mongodb
- redis-server
- cassandra
before_script:
- psql -c 'create database oauth2_server_php;' -U postgres
- composer require predis/predis:dev-master
- composer require thobbs/phpcassa:dev-master
- composer require 'aws/aws-sdk-php:~2.8'
- composer require 'firebase/php-jwt:~2.2'
after_script:
- php test/cleanup.php
CHANGELOG for 1.x
=================
This changelog references the relevant changes (bug and security fixes) done
in 1.x minor versions.
To see the files changed for a given bug, go to https://github.com/bshaffer/oauth2-server-php/issues/### where ### is the bug number
To get the diff between two versions, go to https://github.com/bshaffer/oauth2-server-php/compare/v1.0...v1.1
To get the diff for a specific change, go to https://github.com/bshaffer/oauth2-server-php/commit/XXX where XXX is the change hash
* 1.8.0 (2015-09-18)
PR: https://github.com/bshaffer/oauth2-server-php/pull/643
* bug #594 - adds jti
* bug #598 - fixes lifetime configurations for JWTs
* bug #634 - fixes travis builds, upgrade to containers
* bug #586 - support for revoking tokens
* bug #636 - Adds FirebaseJWT bridge
* bug #639 - Mongo HHVM compatibility
* 1.7.0 (2015-04-23)
PR: https://github.com/bshaffer/oauth2-server-php/pull/572
* bug #500 - PDO fetch mode changed from FETCH_BOTH to FETCH_ASSOC
* bug #508 - Case insensitive for Bearer token header name ba716d4
* bug #512 - validateRedirectUri is now public
* bug #530 - Add PublicKeyInterface, UserClaimsInterface to Cassandra Storage