Skip to content
Permalink
Browse files
Set "X-Frame-Options: SAMEORIGIN" on login page
  • Loading branch information
lachlan-00 committed Aug 9, 2021
1 parent 204ba2f commit ac921793c43cf9edcb998a4a0d48816bda1dc9bb
Showing with 19 additions and 18 deletions.
  1. +4 −1 docs/CHANGELOG.md
  2. +11 −13 public/templates/show_login_form.inc.php
  3. +4 −4 src/Module/Cli/PrintTagsCommand.php
@@ -33,6 +33,7 @@ This means Ampache now **requires** php-intl module/dll to be enabled.
* Save a search or Smartlist as a regular playlist
* New option to refresh a Playlist from Searches with the same name
* Option to change the playlist owner when editing OR importing
* Set "X-Frame-Options: SAMEORIGIN" on login page
* Search changes
* Add 'possible_duplicate', 'recently_played' to song, artist and album search
* Add 'catalog' to artist and album search
@@ -86,6 +87,7 @@ This means Ampache now **requires** php-intl module/dll to be enabled.
* updateCatalog now implies add when using -i / --import by itself
* Playlist Import checks for playlists by your user only in the UI (System for the cli)
* Plugins: Use only https for building gravatar urls
* Scrobble actions now check for the exact time as well (different agents or scripts would insert)
* Subsonic
* Wait a few seconds before allowing scrobbles to avoid collisions
* Shift the last music play if gap is bigger than 5 repeated plays (over night, etc)
@@ -98,7 +100,7 @@ This means Ampache now **requires** php-intl module/dll to be enabled.
* Take out the info icon from the song row; just click the song link
* Take song artist out of the album edit popup
* File tag reading for Band/Album Artist
* Corrected albumartist collection and added missing tags to vorbis, aac and id3v2
* Corrected album_artist collection and added missing tags to vorbis, aac and id3v2
* Removed links from album list headers when split by release type
* REMOVED config options
* write_id3: Use write_tags
@@ -130,6 +132,7 @@ This means Ampache now **requires** php-intl module/dll to be enabled.
* Translations could break JS with apostrophes
* Playlist imports with an empty web_path would never work
* Playlist imports were importing nothing
* list preferences didn't reset allow null values after being set (Personal Favorites plugin)
* Subsonic
* Support a global user playqueue with getplayqueue, saveplayqueue
* Incorrect header being set on art requests
@@ -31,23 +31,21 @@
use Ampache\Module\Util\Mailer;
use Ampache\Module\Util\Ui;

$remember_disabled = '';
if (AmpConfig::get('session_length', 3600) >= AmpConfig::get('remember_length', 604800)) {
$remember_disabled = 'disabled="disabled"';
}
$htmllang = str_replace("_", "-", AmpConfig::get('lang'));
is_rtl(AmpConfig::get('lang')) ? $dir = 'rtl' : $dir = 'ltr';

$web_path = AmpConfig::get('web_path');
$htmllang = str_replace("_", "-", AmpConfig::get('lang'));
$dir = is_rtl(AmpConfig::get('lang'))
? 'rtl'
: 'ltr';

$remember_disabled = (AmpConfig::get('session_length', 3600) >= AmpConfig::get('remember_length', 604800))
? 'disabled="disabled"'
: '';

$_SESSION['login'] = true;
define('TABLE_RENDERED', 1);
$mobile_session = false;
$user_agent = Core::get_server('HTTP_USER_AGENT');
$mobile_session = strpos($user_agent, 'Mobile') && (strpos($user_agent, 'Android') || strpos($user_agent, 'iPhone') || strpos($user_agent, 'iPad'));

if (strpos($user_agent, 'Mobile') && (strpos($user_agent, 'Android') || strpos($user_agent, 'iPhone') || strpos($user_agent, 'iPad'))) {
$mobile_session = true;
} ?>
define('TABLE_RENDERED', 1);
header("X-Frame-Options: SAMEORIGIN"); ?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $htmllang; ?>" lang="<?php echo $htmllang; ?>" dir="<?php echo $dir; ?>">

@@ -67,7 +67,7 @@ public function execute(
$dir_pattern = $catalog->sort_pattern;
$file_pattern = $catalog->rename_pattern;

$info = $this->utilityFactory->createVaInfo(
$vainfo = $this->utilityFactory->createVaInfo(
$filename,
['music'],
'',
@@ -83,8 +83,8 @@ public function execute(
);
}
try {
$info->get_info();
$results = $info->tags;
$vainfo->get_info();
$results = $vainfo->tags;
$keys = VaInfo::get_tag_type($results);
$ampache_results = VaInfo::clean_tag_info($results, $keys, $filename);

@@ -94,7 +94,7 @@ public function execute(
);
$io->eol(2);

print_r($info);
print_r($vainfo);

$io->eol();
$io->info('------------------------------------------------------------------', true);

0 comments on commit ac92179

Please sign in to comment.