Is it considered as a DOS attack if I add too much data to a page so that it doesn’t respond at all?

I am working on an application. There is a new feature implemented where a user create some IDs and secret keys for that application.

I have observed that there is no rate limit for creating those.

I have sent the request to intruder and created nearly 11000 sets of IDs and secrets.

So whenever any user tries to access that page, it loads continuously and displays a message that page has become unresponsive and as a result it doesn’t let user to access anything in the page.

In my point of view, this is a vulnerability because lack of rate limiting is leading to inaccessibility of the page for all the users in the application.

However, I am confused if it is as considered as a DOS attack or valid rate limiting issue.

Please suggest with valid justification.

Why can’t I connect to the wordpress install page with Nginx?

I’m a newbie of WordPress. My environment is Ubuntu 18 + Nginx + PHP 7.

Following the tutorial(https://www.myfreax.com/how-to-install-wordpress-with-nginx-on-ubuntu-18-04/), the wordpress directory was placed on /var/www/html/device1.com.

Then I config the nginx, here is my nginx config:

server {     listen 80;     server_name www.device1.com device1.com;      server_name device1.com;      root /var/www/html/device1.com;     index index.php;       # log files     access_log /var/log/nginx/device1.com.access.log;     error_log /var/log/nginx/device1.com.error.log;      location = /favicon.ico {         log_not_found off;         access_log off;     }      location = /robots.txt {         allow all;         log_not_found off;         access_log off;     }      location / {         try_files $  uri $  uri/ /index.php?$  args;     }      location ~ \.php$   {         include snippets/fastcgi-php.conf;         fastcgi_pass unix:/run/php/php7.2-fpm.sock;     }      location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$   {         expires max;         log_not_found off;     }  } 

But, when I tried to connect to http://device1.com/wp-admin/install.php the Nginx responses 404, instead of returning the wordpress install page.

I don’t have any idea of checking the issue. Thanks for your suggestion.

Go back to the exact post page number

I use pagination in my index.php and I have many posts per page. Every post have a button to go back to home. The problem is that when I visit a post in a page 5 for example, the button always send me on the first page.

I’m using this: <a href="<?php echo home_url(); ?>">back</a>

Is there a simple way to track the post page position, and use it to go back properly?

Sort the result of the main Query in shop page by a custom taxonomy

In a WooCommerce site, we have products that have a custom taxonomy that are assign to a region.

When the user visits the site, we activate the browser geolocation, and we assign the user a region in a cookie.

Now we would like to show, in the shop page and in the product_cat taxonmies, in first the products that are assign to the same region of the user and then all other regions.

How could we implement this ?

So far, I taught of using pre_get_posts, and using something like :

add_action('pre_get_posts', 'order_by_region', 999999); function order_by_region($  q){  if(!is_admin() && $  q->is_main_query() && (is_shop() || is_tax('product_cat'))){   $  q->set('orderby', 'meta_value');   $  q->set('order', 'DESC');   $  q->set('value', $  _COOKIE['nameofusercookie']);   $  q->set('meta_key', 'regions');   }   return $  q; } 

But this didn’t work. I just found that in there it will filter the posts instead of ordering by regions.

I found the ‘the_posts’ hook. That contains all the products after quering but not yet looped. I think it might be better place to sort all the products with the cookie. But how do i compare the cookie and the regions taxonomy in each products ?

add_filter('the_posts', 'sort_query_by_region', 10, 2); function sort_query_by_region($  posts, $  q){  $  cookie = $  _COOKIE['selected_region'];   if(isset($  cookie) && !empty($  cookie)){   if(!is_admin() && $  q->is_main_query() && (is_shop() || is_tax('product_cat'))){    $  posts = sortByRegion($  posts);   }  }  return $  posts; }  function sortByRegion($  posts){  usort($  posts, "regionOrder");  return $  posts; }  function regionOrder($  a, $  b) {    // get the cookie    $  cookie = $  _COOKIE['slected_region'];    // Get the term region of each compared product   $  regionA = get_the_terms($  a->ID, 'regions')[0]->slug;   $  regionB = get_the_terms($  b->ID, 'regions')[0]->slug;    if($  regionA != $  cookie || $  regionB != $  cookie){    return ($  a, $  b);   } else {    return $  a < $  b;   } } 

I must that either doesn’t work.

Anyone everdone such a re-ordering and knows I to help me?

Seeking advice – Building a Landing Page

I need your help to pass a job test! I have to design and implement a landing page. I have some experience with html and css, but i never implemented a landing page or a website, and I never used Java script.

They mainly want to evaluate my html skills and want to "understand my idea behind how certain elements behave and why these particular elements behave that way". It's important to make the landing page responsive. I am allowed to use "frameworks" and other sources.

So, here are my…

Seeking advice – Building a Landing Page

Google Search Console cannot read my XML: Sitemap appears to be an HTML page

I’m working on a web application written with AngularJS (v8) and deployed on an apache2 using proxy to forward requests (frontend, api, backoffice).

My problem is that I’m trying to submit the sitemap ({website}/sitemap.xml) on Google, but Google Search Console keep saying that it’s not valid: Google can read the link but it seem to be in HTML

gsc

My sitemap: sitemap

I tried to validate that XML on many website and I didn’t find any error.

I mentioned apache2 because maybe when Google try to fetch the URL, before finding the XML, apache give another page but I cannot prove that. I tried in many ways and the first page that I see when opening the URL is the sitemap and nothing else.

In my angular.json I added the file in the assets as follow:

"assets": ["src/favicon.ico", "src/assets", "src/sitemap.xml"],

What it can be?

Thank you

Sitemap: Should I dynamically update sitemap for dynamic content or create a page containing all the dynamic links

Say i have the following route http://<my-domain>/{category}/subjects/{id}/Sitemap: Should I dynamically update sitemap for dynamic content or create a page containing all the dynamic links

the ones in the brackets are dynamic, I’m struggling with what is better or any better way to let google crawl through all these dynamic links

Approach 1: manually doing the job by removing or adding the record to site map and updating <lastmod>

Approach 2: create a page that includes all those links and reference that page in sitemap.xml

The second approach can be generated as a plain html file which is generated from the server app. Or, a simple webform aspx page that dynamically generates those links without having to create an html file.

can’t see information on author page that don’t have posts

I have page for each author role, but if the author doesn’t have any posts I can’t get its variables, because the loop is empty. The page returns empty, no avatar, no author name and bio.

How do I get WordPress to pull out the author variable if there are no posts?

I’m using hello elementor theme and WP User Avatar plugin.