This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Set redis configuration. | |
*/ | |
/** @see: https://docs.platform.sh/frameworks/drupal8/redis.html */ | |
if (extension_loaded('redis')) { | |
// Set Redis as the default backend for any cache bin not otherwise specified. | |
// $settings['cache']['default'] = 'cache.backend.redis'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
dd(vsprintf(str_replace('?', '%s', $query->toSql()), collect($query->getBindings())->map(function ($binding) { | |
return is_numeric($binding) ? $binding : "'{$binding}'"; | |
})->toArray())); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Locate directory GoBuster | |
- gobuster dir -u http://10.10.239.220:3333 -w /usr/share/wordlists/dirbuster/directory-list-1.0.txt | |
Compromise server with burp | |
- upload file with burp browser | |
- send request to intruder + in positions select sniper attack add § to file extension | |
- in payloads add list of file extensions to test + disable payload encoding (at least for this playground) | |
Serch for SUID (set owner userId upon execution) | |
- find / -user root -perm -4000 -exec ls -ldb {} \; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Implements hook_pathauto_pattern_alter(). | |
*/ | |
function cnt_description_pathauto_alias_alter(&$alias, array &$context) { | |
if ($context['module'] == 'node' && ($context['bundle'] == 'cnt_description')) { | |
$exploded_alias = explode('/',substr($alias, 1)); | |
$exploded_alias[0] = preg_replace([ | |
'/policy/', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Local development services. | |
# | |
# To activate this feature, follow the instructions at the top of the | |
# 'example.settings.local.php' file, which sits next to this file. | |
parameters: | |
http.response.debug_cacheability_headers: true | |
twig.config: | |
debug: true | |
auto_reload: true | |
cache: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function update(Univers $univers, User $user) { | |
Gate::authorize('user-subscriptions-edit', [$user, $univers]); | |
$validatedData = $this->validateUpdateRequest(); | |
$subscriptionValid = (int)Code::getCodeByName('Valid', 'code_short', 'Subscription Status')->code_id; | |
$subscriptionInvalid = (int)Code::getCodeByName('Not Valid', 'code_short', 'Subscription Status')->code_id; | |
$formatHTML = (int)Code::getCodeByName('HTML', 'code_short', 'SV format')->code_id; | |
$frequencyOnDemand = (int)Code::getCodeByName('On Demand', 'code_short', 'SV frequency')->code_id; | |
// $validSubscriptions = $user->subscriptions()->where(['seus_unsubscription_date' => null, 'seus_status' => $subscriptionValid])->get(); | |
// $services = $this->getServices($univers, null, $validSubscriptions); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/cas.tokens.inc b/cas.tokens.inc | |
index 97aea2b..b0eb797 100644 | |
--- a/cas.tokens.inc | |
+++ b/cas.tokens.inc | |
@@ -29,6 +29,10 @@ function cas_token_info() { | |
'name' => t('Login URL'), | |
'description' => t('The CAS login URL.'), | |
], | |
+ 'login-url-absolute' => [ | |
+ 'name' => t('Login URL (absolute)'), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This is the turbo mode for my dev enviroment. | |
# This creates ~/ramdisk dir mounts a tmpfs partion for current project location. | |
# Props to Stavros Kounis for idea. | |
# ===== Functions START ===== | |
func_hello() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In EntityType.php line 922: | |
[LogicException] | |
Missing bundle entity, entity type flag, entity id email_node. | |
Exception trace: | |
at /home/adriano/Documents/_DEV/futuriumd8/web/core/lib/Drupal/Core/Entity/EntityType.php:922 | |
Drupal\Core\Entity\EntityType->getBundleConfigDependency() at /home/adriano/Documents/_DEV/futuriumd8/web/core/lib/Drupal/Core/Entity/EntityDisplayBase.php:306 | |
Drupal\Core\Entity\EntityDisplayBase->calculateDependencies() at /home/adriano/Documents/_DEV/futuriumd8/web/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:318 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@api @javascript @notifications @this | |
Feature: Notificatios | |
As an group manager I should be notified of new content | |
Background: | |
Given the cache has been cleared | |
Given I am logged in as a user with the administrator role | |
Given a group of type "fut_open" | |
| label | Broadband networks | | |
| fut_short_name | Group Name | |
NewerOlder