Kharkiv, Ukraine
Account created on 3 January 2008, over 16 years ago
#

Merge Requests

Recent comments

🇺🇦Ukraine goodboy Kharkiv, Ukraine

Hello, @aaronbauman
We are going to extend Drupal\salesforce\SelectQuery by adding simple functions. This will allow us to create chains like

$query
  ->fields(['field1', 'field2'])
  ->addCondition('status', 1)
  ->addOrder('DateCreated', 'DESC')
  ->limit(1);

Does it make sense to propose these functions for inclusion in Drupal\salesforce\SelectQuery? If not, can we safely use our derived class with these functions?

public function objectType($value) {
    $this->objectType = $value;
    return $this;
  }

  public function fields(array $fields) {
    $this->fields = $fields;
    return $this;
  }

  public function addField($field) {
    $this->fields[] = $field;
    return $this;
  }

  public function order(array $order) {
    $this->order = $order;
    return $this;
  }

  public function addOrder($field, $value = 'ASC') {
    $this->order[$field] = $value;
    return $this;
  }

  public function limit($value) {
    $this->limit = (int) $value;
    return $this;
  }

  public function offset($value) {
    $this->offset = (int) $value;
    return $this;
  }
🇺🇦Ukraine goodboy Kharkiv, Ukraine

Hello @bburg, thanks for your proposition.

I think I could be add a "Merge" button to addition to "Add" button.
If you pushed to the Merge button and if you entered a range IP - we won't check existing IP.

🇺🇦Ukraine goodboy Kharkiv, Ukraine

@Kristen Pol, @AaronDeutsch - thanks for logos for Advanced ban and Autoban modules.

🇺🇦Ukraine goodboy Kharkiv, Ukraine

@Kristen Pol, thanks for your message.
I tried to add logo.png to my another project https://www.drupal.org/project/autoban and it doesn't work (https://git.drupalcode.org/project/autoban/-/raw/8.x-1.x/logo.png?ref_type=heads). I figured out that the logo file has size 10.7kb but I don't know to decrease it. In my opinion, the conditions for the image are close to impossible.

But if someone sends me a image and I like it, I will add it to the project.

🇺🇦Ukraine goodboy Kharkiv, Ukraine

@trickfun, please check the removing at the latest dev version.

🇺🇦Ukraine goodboy Kharkiv, Ukraine

The watchdog table has 2 columns: untranslated text pattern (on English) and the serialized variables. The human-reading text is generating by t(pattern, variables) due to current language. We can use only the unified message pattern or the variables string with serialized format.

I don't see a simple solution yet.

🇺🇦Ukraine goodboy Kharkiv, Ukraine

@jwilson3, I'm agree with your idea. That's a right solution, in my mind.
If you create a merge request or patch file, I will consider it

🇺🇦Ukraine goodboy Kharkiv, Ukraine

@jungle, thanks for your work.
Could you tell me how you performed the deprecation check?

🇺🇦Ukraine goodboy Kharkiv, Ukraine

@Sonal Gyanani, the patch is Failed to Apply.
Please, reroll

🇺🇦Ukraine goodboy Kharkiv, Ukraine

@corE, hello, thanks for using the Autoban.
if I understood correctly, you're receiving requests like /wp_admin or /erwefdsfsd/sfsfsf . But if you have (for example) Articles pages (/articles) on your site it's ok for you receiving 404 error for requests like /articles/some_deleted_article.

Yes, I think it can be solved using some like Pattern Whitelist. So, if we put "/articles/" pattern to the list the /articles/some_deleted_article won't be banned. May be the best way is using pathauto patterns for generating list for this.

Thanks for the idea, I'll think about implementing it.

🇺🇦Ukraine goodboy Kharkiv, Ukraine

I tried the patch and it was ok

🇺🇦Ukraine goodboy Kharkiv, Ukraine

Hello,
the checkbox "Save last IP ban expiry duration" affects to the default expiry duration only.

Case, when the checkbox is disabled.

  • You set default expiry duration as "1 day"
  • You ban a few IPs and set "1 week" duration (not default value) and need to change the expiry value from default one
  • If you don't want to do the changing every time you need to go to the Settings Form, change default expiry duration value to "1 week"

The checkbox automates the work. If the checkbox is enabled the default expiry duration will be changed automatically and you can do IP ban series without changing the default expiry duration value at the Settings Form.

🇺🇦Ukraine goodboy Kharkiv, Ukraine

@dineshkumarbollu, exactly

🇺🇦Ukraine goodboy Kharkiv, Ukraine

The patch completely broke the script. Do you think this is the right replacement?

-          $(iteration.selectors).once('responsive-menus-codrops-multi-menu', function() {
+          $(once('responsive-menus-codrops-multi-menu', 'iteration.selectors'), function() {
🇺🇦Ukraine goodboy Kharkiv, Ukraine

I did the following:

  1. Updated the taxonomy Tags and received a message in DB log "Updated vocabulary Tags."
  2. Went to the Autoban Log Analyze (/admin/config/people/autoban/analyze) and I see an entry with columns values:
    Type = 'taxonomy', Message raw = 'Updated vocabulary %name.' and Variables raw = 'a:1:{s:5:"%name";s:4:"Tags";}'
  3. Created an Autoban rule with parameters:
    Type = 'taxonomy', Message pattern = '^Updated', Threshold = 1
  4. The query mode was set as REGEXP.

I ran SQL query as
"SELECT "log"."hostname" AS "hostname", COUNT(log.hostname) AS "hcount" FROM {watchdog} "log" WHERE ("log"."type" = :db_condition_placeholder_0) AND (("log"."message" REGEXP :db_condition_placeholder_1) OR ("log"."variables" REGEXP :db_condition_placeholder_2)) GROUP BY "log"."hostname" HAVING (COUNT(log.hostname) >= :cnt)" and got IP addresses as result.

Pure SQL query is
SELECT log.hostname AS hostname, COUNT(log.hostname) AS hcount FROM watchdog log WHERE (log.type = 'taxonomy') AND ((log.message REGEXP '^Updated') OR (log.variables REGEXP '^Updated')) GROUP BY log.hostname HAVING (COUNT(log.hostname) >= 1)'and I got the same result using mysql console.

I did the same thing with the name.$ expression

So SQL REGEXP works and it's all in the expression itself. Perhaps the problem is in the escaping of special characters.

🇺🇦Ukraine goodboy Kharkiv, Ukraine

Hi, Autoban uses SQL Regexp syntax, see https://dev.mysql.com/doc/refman/8.0/en/regexp.html#operator_regexp.
I've added a debug mode to the latest developer version. You can see the text of the request via the Test link, for example.

The query mode has 2 options: LIKE/REGEXP
Also, you can use Wildcards or no.

🇺🇦Ukraine goodboy Kharkiv, Ukraine

@viren18febS, thanks, fixed.
Please, run test for a patch

🇺🇦Ukraine goodboy Kharkiv, Ukraine

@andrei.vesterli, the patch can't be applied.
I've tried to do phpcs and got a patch file with 222 rows.
So, please, reroll your patch

🇺🇦Ukraine goodboy Kharkiv, Ukraine

goodboy changed the visibility of the branch 3414590-redundancy-in-italian to hidden.

🇺🇦Ukraine goodboy Kharkiv, Ukraine

goodboy changed the visibility of the branch 3414590-redundancy-in-italian to hidden.

🇺🇦Ukraine goodboy Kharkiv, Ukraine

goodboy made their first commit to this issue’s fork.

🇺🇦Ukraine goodboy Kharkiv, Ukraine

I don't think this template (foo%/%foo%.%foo%.%foo%.%foo%) will work, need to create new one with regexp syntax.

🇺🇦Ukraine goodboy Kharkiv, Ukraine

@lexhouk, yes, this is all individual and subjective. More opinions are needed to decide on this.

🇺🇦Ukraine goodboy Kharkiv, Ukraine

Hi, Juan Carlos
I see a quick way is to inserting watchdog entries on webform committing by some webform hook.
You can analyze your webform commits (for example, checking for external links in body field) and then creating watchdog entries with 'bad submission' type. And then create an Autoban rules as "ban all IPs for that dblog type".

🇺🇦Ukraine goodboy Kharkiv, Ukraine

Hi, Juan Carlos!
The Autoban uses SQL Like syntax on its queries,
Using * denotes one of 3 options:

  • begin with (foo%)
  • ends with (%foo)
  • contains inside (%foo%)

The Autoban query uses message and variables fields, I have changed dev version of Autoban and now you can see the variables field values at the Log analyze page. I think you need to use REGEXP mode for Autoban module instead of LIKE with wildcards for your case. You can try to create SQL query using REGEXP by mysql/phpmyadmin and then to create an Autoban rule.

🇺🇦Ukraine goodboy Kharkiv, Ukraine

@Steven, thanks, comitted

🇺🇦Ukraine goodboy Kharkiv, Ukraine

@lexhouk, thanks for your attention to the module.

Now we have: "Edit Core Ban, Advanced Ban"
After the patch will be "Edit | Core Ban | Advanced Ban", right?
I think the best view might be: "Edit | Core Ban, Advanced Ban"

🇺🇦Ukraine goodboy Kharkiv, Ukraine

Thanks, Ron! Fixed

🇺🇦Ukraine goodboy Kharkiv, Ukraine

@pfrenssen, I found the solution, thanks. I just wanted to say that updating Drupal is getting more and more difficult every time. This is not just a formal procedure; you need to carefully read the instructions and program the update. Maybe someone likes it, it’s hard to say.

The update instructions are too long and filled with unnecessary details. Why not create an update script instead. But these are empty words, of course,

🇺🇦Ukraine goodboy Kharkiv, Ukraine

Thanks, @mrweiner
I've created a light custom module which used the CER Resolver. I don't use entities and store an entity referenced map to YML-file.
As I understand it, it makes no sense to publish my module as a separate ones.

🇺🇦Ukraine goodboy Kharkiv, Ukraine

@cilefen, my problem was I run
drush deploy
drush deploy = drush updb, cim, cr, deploy.
And I re-writing my configuration by drush cim command.

I need to do drush updb and then drush cex for fixing the configuration changes
So, the full update way should be:
1. drush cim
2. drush updb
3. drush cr
4. drush cex

I believe that someday there will be a core update with a single drush core-update command (not to mention a single button press) instead of update programming

🇺🇦Ukraine goodboy Kharkiv, Ukraine

I have the same problem.
Drupal was updated from 10.0.9 (existing site)
I tried:

composer update "drupal/core-*" --with-all-dependencies
composer update
drush deploy

Update script completed successfully

I deleted composer.lock and vendor directory and then ran again.
I tried log in by browser and my React app.
I reverted to 10.0.9 and now all ok.
How to update Drupal to 10.1 to be able to login?

🇺🇦Ukraine goodboy Kharkiv, Ukraine

Hi, look at the settings page /admin/config/people/autoban/settings
You can choose "Use wildcard" and try to use 'wp%' pattern.
Or you can select Query mode to REGEXP and use regexp on your pattern.
See also Wildcard Characters in SQL Server

🇺🇦Ukraine goodboy Kharkiv, Ukraine

I am having the same issue.
$notification_emails is NULL.

🇺🇦Ukraine goodboy Kharkiv, Ukraine

Fixed at the dev-version by automatic patch

🇺🇦Ukraine goodboy Kharkiv, Ukraine

@sidgrafix, I tried to keep the window feature and made a comit again, Please test

🇺🇦Ukraine goodboy Kharkiv, Ukraine

@bart lambert, thanks, I made commit, hope the issue is fixed, please test dev-version.

🇺🇦Ukraine goodboy Kharkiv, Ukraine

@corE, thanks, fixed

🇺🇦Ukraine goodboy Kharkiv, Ukraine

@dtw_2000, D9 changed dblog storage, I re-work Analyze section in Autoban, please test

🇺🇦Ukraine goodboy Kharkiv, Ukraine

@99gs3, I've updated dev version, please test

Production build 0.71.5 2024