0400: QUIET FOX (and a bit more)

/*** 0400: QUIET FOX [PART 2] [WARNING]

should we rename the section because almost everything in 0400 is now enabled and it has nothing to do with QUIET FOX anymore? fe. Blocklists, Safe Browsing and Tracking Protection

0430: SSL reporting could go to 1200 because it fits there better anyway

the Warning tag: isn't that tag for things that break? Wouldn't the SETUP tag be better, if any?
0402: the 4 collection prefs are maybe not easy to understand in the current form. Can we set them to empty string and comment them out, so it's easier to disable them should someone choose to do so?
Enforcing the default values doesn't make much sense IMO

similar to the last point above, I also think 2617 (pdfJS) would be better if we change the value and the title (to: disable) and comment it out. It currently enforces the default value (=enable pdfjs) which I think is weird in a file that aims to enhance security. Idc whether we enable or disable pdfJS by default btw.
The idea is that it shouldn't be necessary to change the pref values, but rather being able to disable/enable something by un-commenting or commenting out the prefs.
Now you: do you have pdfJS enabled or not?
(not doing votes anymore because we just end up ignoring it anyway ;)

Enforcing the default values doesn't make much sense IMO...The idea is that it shouldn't be necessary to change the pref values, but rather being able to disable/enable something by un-commenting or commenting out the prefs.

I agree with this, especially in places where it isn't explicitly stated that you're enforcing the default. This is because I research every deviation from the default by looking for discussions about the setting online, and given hundreds of settings, this took me many hours the first time. Knowing that something is left at default makes it less interesting (ie. I can just quickly read the description and move on). This change would make the file a lot more user-friendly I think.

Maybe the warning should be included in the following sentence?
[WARNING]
This section has security & tracking protection implications vs privacy concerns
vs effectiveness vs 3rd party 'censorship'. We DO NOT advocate no protection.
If you disable Tracking Protection (TP) and/or Safe Browsing (SB), then
SECTION 0400 REQUIRES YOU HAVE uBLOCK ORIGIN INSTALLED.

I adjusted the beginning:
WARNING: This section has implications regarding [1] security & tracking protection vs privacy
concerns and [2] built-in mitigations vs 3rd party 'boycott'...

0402 : I had already noticed that this sticks out as inconsistent

the title (which we can tweak) is about "quiet"
the pref values in 0400 (in general) are about turning things off
the descriptions in 0400 (in general) are about turning things off

So 0402 should do the same. It has nothing to do with enforcing default values.

should we rename the section because almost everything in 0400 is now enabled

We can improve the name. A pref (if used) should reflect the description. The prefs "if used" reflect the title. It is not about the title/descriptions reflecting the "active/inactive" state of anything. Consider this
/*** PREVENT NUCLEAR WAR ***/
/* 666: disable Trump's access to the red button ***/
   // user_pref("red.button.enabled", false)

The description of pref 666 matches the intent of the pref if uncommented. And the pref(s) combined have the intent of the section header. Let me re-write that
/*** KEEP FIREFOX QUIET ***/
/* 666: disable all TP & SB ***/
   // user_pref("tp.and.sb.enabled", false)

Now "QUIET FOX" is not the best title but it describes the section's purpose correctly. We also use the term in section 0300, and 400 was originally split off from 0300. We could do better. They don't have to have the same name (eg part 1 etc). So I'm all ears.

Warning tag: isn't that tag for things that break? Wouldn't the SETUP tag be better

Well, TBH, warning seems appropriate as making the prefs active can put a person at risk. It's not just for breakage. But no reason it can't have both (see section 0300, see pref 1020). It's not indicative of a pref's active/inactive status either (see pref 1201).

I see [Warning] as informing people that using this pref either causes breakage or adds risk
I see [Setup} as informing people of some items of interest they may want to check before implementing the js or for toubleshooting (warning also troubleshoots)

ToDo:

[ ] replace 0400 and 0300 section titles. Definitely remove the part 1 and part 2 titles
[ ] change 0402 to "disable" in description, change pref values to false and nulls and make it all inactive
[ ] change 0401 to same as 0402: , i.e description to disable but make .enabled inactive
[ ] what else?
[ ] 2617 (pdfjs) - debatable (see next comment)

2617 (pdfjs).
We have four options:

enforce default value (false) <- currently what we have
inactive default (false)
enforce using an external app (true)
inactive use an external app (true)

FALSE

Option 1 = current
Option 2 seems reasonable at first glance. Change 2617: enable pdf.js... wording to 2617: enforce pdf.js... and make the pref inactive. This means that the default is still observed, and the js no longer meddles with experienced users' who have switched to a possibly more secure pdf reader.

TRUE

Option 3 should not be a no no IMO. Enforcing an external app, we have no idea what app they use, might be a 2 yrs old adobe acrobat. They might not even have a pdf reader on their system. Not a responsible thing to do.
Option 4 seems problematic. Suggesting an external app. It would encourage users to use an external app, but we provide no help with that. IMO 99% of users are best off with the internal viewer.

@fmarier Does the pref extensions.blocklist.enabled (0401) still contain updates for revoked certs? Is it even still relevant considering we have Kinto
user_pref("services.blocklist.addons.collection", "addons"); <== extension blocks
user_pref("services.blocklist.onecrl.collection", "certificates"); <== revoked certificates

Does the pref extensions.blocklist.enabled (0401) still contain updates for revoked certs? Is it even still relevant considering we have Kinto.

I don't know, I'm not familiar with that code. You could ask on dev-security.

[ ] move SSL Error Reporting to 1200

I am keen on this, it reduces 0400 to just blocklists, tp and sb. Where in 1200 do I position it?

I only wanted to comment out the 4 "collection" prefs, not everything else too. Enforcing the blocklist updates is a good thing IMO. "Enforcing" already hints at the pref being enforced to the default value. But we can also add a (default true/false) in the title lines (as we already do for some items) or in the other lines of the description, or behind the pref: "pref.enabled", true); // default: true

I just can't win with you girls. I am about to do commit which adds subsection headers (like we did in 1200s). The section title is immaterial now. Would you like
/** BLOCKLISTS ***/
/* 0401: enforce extension blocklist, but sanitize blocklist url
 * [NOTE] It now includes updates for "revoked certificates"
 * [1] https://blog.mozilla.org/security/2015/03/03/revoking-intermediate-certificates-introducing-onecrl
 * [2] https://trac.torproject.org/projects/tor/ticket/16931 ***/
user_pref("extensions.blocklist.enabled", false);
user_pref("extensions.blocklist.url", "https://blocklist.addons.mozilla.org/blocklist/3/%APP_ID%/%APP_VERSION%/");
/* 0402: enforce Kinto blocklist updates (FF50+)
 * What is Kinto?: https://wiki.mozilla.org/Firefox/Kinto#Specifications
 * As Firefox transitions to Kinto, the blocklists have been broken down into entries for certs to be
 * revoked, add-ons and plugins to be disabled, and gfx environments that cause problems or crashes. Use
 * .update_enabled as a master switch or remove the .collection name to disable each individually ***/
user_pref("services.blocklist.update_enabled", true);
user_pref("services.blocklist.signing.enforced", true);
   // user_pref("services.blocklist.onecrl.collection", ""); // revoked certificates
   // user_pref("services.blocklist.addons.collection", "");
   // user_pref("services.blocklist.plugins.collection", "");
   // user_pref("services.blocklist.gfx.collection", "");

this means blocklists we are making it clear that we do not condone turning them off

will fix 0300 title when I deal with auto-update checks

Why? I think it fits nicely on that section. I was only talking about 0400 where it doesn't seem to fit anymore.

I'm doing it ^^

Why? I think it fits nicely on that section. I was only talking about 0400 where it doesn't seem to fit anymore.

See topic on auto-updates - i made a note for myself to remove the [Part 1] bit and maybe a better title

extensions.blocklist.enabled should be set to true IMO, same as we had before your most recent change.
the title for 0402 isn't quite right with all the prefs in there. Maybe something like this (?)...
/* 0402a: enforce Kinto blocklist updates (FF50+)
 * ... ***/
user_pref("services.blocklist.update_enabled", true);
user_pref("services.blocklist.signing.enforced", true);
/* 0402b: disable unwanted/unneeded parts of the blocklists
 * .... ***/
   // user_pref("services.blocklist.onecrl.collection", ""); // revoked certificates
   // user_pref("services.blocklist.addons.collection", "");
   // user_pref("services.blocklist.plugins.collection", "");
   // user_pref("services.blocklist.gfx.collection", "");

oh, only the[Part 1]bit, I see, yeah nothing wrong with that

thanks for that, forgot the false=>true bit - all done
I will now do subheaders for SB and TP. SB will get proper numbers 0410, 0411 etc

OK .. so many changes ... yes or no, leave as it or move the collection parts to 0403?

I didn't check, that's why I used 0402 a+b, but yeah if 0403 is free, that's fine too

"QUIET FOX" ... describes the section's purpose correctly.

I agree 100%, please don't change it - I like it, a lot! :)

^^ 0400 is already renamed - 0300 can keep it though

lol, this form of communication causes sooo much problems. I meant please keep "quiet fox" for 0300.
since I myself suggested changing the title for 0400 I assumed it was clear what I meant, but yeah, sorry. shit happens

I see [Warning] as informing people that using this pref either causes breakage or adds risk

I have a bit of a problem with "or adds risk" because it's really hard to determine that. IMO [WARNING] should mean "can/will cause breakage" only.
That's also what I understand the line at the top of the file means:

Search this file for the "[WARNING]" tag to troubleshoot or prevent SOME common issues

.. no mention of "or adds risk" in that. I think only very few items/prefs need a Warning tag that way, fe the disable cookie. If it should also mean "or add risk" then we would need to maybe add a lot more.
If something needs special mention ie. risk or something like that, it should be behind [NOTE] IMO

^^ I understood that.  I will probably remove it. Since TP+SB FF defaults are not changed by the js, and once I do the same for auto-update checking, then the big scary warning can go.

quick review dude
/** TRACKING PROTECTION (TP)
    There are NO privacy concerns here, but we strongly recommend to use uBlock Origin as well,
    as it offers more comprehensive and specialized lists. It also allows per domain control. ***/
/* 0420: enforce Tracking Protection in all windows
 * [1] https://wiki.mozilla.org/Security/Tracking_protection
 * [2] https://support.mozilla.org/en-US/kb/tracking-protection-firefox ***/
   // user_pref("privacy.trackingprotection.pbmode.enabled", false); // private browsing pref
user_pref("privacy.trackingprotection.enabled", true); // enforces ALL windows if true (not just private)
/* 0421: enable more Tracking Protection choices under Options>Privacy>Use Tracking Protection
 * Displays three choices: "Always", "Only in private windows", "Never" ***/
user_pref("privacy.trackingprotection.ui.enabled", true);
/* 0422: use "basic" or "strict" tracking protecting list - ONLY USE ONE!
 * [SETTINGS] Options>Privacy>Use Tracking Protection>Change Block List ***/
   // user_pref("urlclassifier.trackingTable", "test-track-simple,base-track-digest256"); // simple/basic
   // user_pref("urlclassifier.trackingTable", "test-track-simple,base-track-digest256,content-track-digest256"); // strict
/* 0423: disable Mozilla's blocklist for known Flash tracking/fingerprinting (FF48+)
 * [1] http://www.ghacks.net/2016/07/18/firefox-48-blocklist-against-plugin-fingerprinting/
 * [2] https://bugzilla.mozilla.org/show_bug.cgi?id=1237198 ***/
   // user_pref("browser.safebrowsing.blockedURIs.enabled", false);
/* 0424: disable Mozilla's tracking protection and Flash blocklist updates ***/
   // user_pref("browser.safebrowsing.provider.mozilla.gethashURL", "");
   // user_pref("browser.safebrowsing.provider.mozilla.updateURL", "");

will do SB subsection next. Is the subsection indent OK or do I add *

we first need to decide if "enforce" means "enforce the same values as Firefox's default value", or not.
If we want to use it that way then 0420 should not be titled "enforce" but only "enable".
Either way I think we need to split up the 2 prefs in 0420, because it's against "our logic" atm ie. enforce in title->pb.enabled;false
The rest looks good, but don't take my word for it - I'm pretty tired atm

Is the subsection indent OK or do I add *

you decide. you're in charge of formatting decision. I think atm we don't have *'s for section titles/descriptions or subsections, but feel free to change that

Enforce to me is just a word. It usually has a verb (or implied verb) after that which describes the effect of the preference+value
eg
/* 0401: enforce (using <- verb implied) extension blocklist
user_pref("extensions.blocklist.enabled", true); // ff default

/* 0910: enforce disabling autofilling saved password on HTTP pages and show warning (FF52+)
user_pref("signon.autofillForms.http", false); // ff default

/* 1222: enforce (using<-verb implied) strict pinning
user_pref("security.cert_pinning.enforcement_level", 2); // NOT ff default

Ok, np, was only an idea. It IS just a word but we could give it that meaning, but we by no means have to. Ok, enforce is just a word then (agreed?).
But 0420 is still weird if the title says enforce and one of the 2 prefs is commented out and set to false. I'd say we either split it into 2 numbers (:thumbsdown:) or simply activate the 2nd pref too and set it to true (pb.enabled;true) (:thumbsup:). Either way we should clarify that one is default false in FF atm and the other one is default true in FF atm. Just do whatever changes you want and I'll do a side-by-side compare later today with the latest version and the old unchanged version and then get back to you.

Ok, enforce is just a word then (agreed?).

to clarify, I only brought it up because it could IMO be confusing if we randomly use enable, disable and (for no reason) sometimes "enforce".
the way I look at it is, a feature that's disabled by default in Firefox can be (a) enabled or (b) force-disabled ie "enforced" (and vice-versa if a feature is enabled by default in FF)
Everything we have in the user.js is "enforced" in a way anyway. If "enforced" is just a word then we should stick to enable and disable IMO

Yes, enforce is just a word

not sure if you're looking at my now deleted post in here, or what I actually committed. The effect is TP is enforced. No way do I want 2 numbers (thumbs down as you said) - this is 2 prefs which give three options so best to keep them together. But you're right, looks a little weird.
commit
/* 0420: enforce Tracking Protection (to disable set both prefs as false)
 * If .enabled = true then .pbmode.enabled is IGNORED and TP is enabled for ALL windows
 * If .pbmode.enabled = true (and enabled = false) then TP is Private Browsing windows only
 * [1] https://wiki.mozilla.org/Security/Tracking_protection
 * [2] https://support.mozilla.org/en-US/kb/tracking-protection-firefox ***/
   // user_pref("privacy.trackingprotection.pbmode.enabled", true); // private browsing pref
user_pref("privacy.trackingprotection.enabled", true); // enforces ALL windows if true (not just private)

mod - just make the first pref active - thumbs up if you agree. It will have no effect and the info is in the description
user_pref("privacy.trackingprotection.pbmode.enabled", true); // PB mode only, if next pref is false

/* 0420: enforce enable Tracking Protection (to disable set both prefs as false)

If .enabled = true then .pbmode.enabled is IGNORED and TP is enabled for ALL windows
If .pbmode.enabled = true (and enabled = false) then TP is Private Browsing windows only
[1] https://wiki.mozilla.org/Security/Tracking_protection
[2] https://support.mozilla.org/en-US/kb/tracking-protection-firefox ***/
user_pref("privacy.trackingprotection.pbmode.enabled", true); // private browsing pref default: true
user_pref("privacy.trackingprotection.enabled", true); // enforces ALL windows if true (not just private) default: false

note:

enable instead of enforce (see above ;)
drop (to disable set both prefs as false)
changed comments behind the prefs - no need to repeat what the description already makes very clear, but instead let users know which ones are enabled/disabled by default in Firefox
and yes, "activate" the 1st pref too to be in line with the title ("enable TP")

already have another issue in for bulk replacement of words in favor of enable/disable

if I drop (to disable set both prefs as false) then the third setting is not mentioned or shown how to achieve

the third setting?

 Even if .pbmode.enabled is false?

Three settings:

yeah, but come on, the pref names are pretty easy to understand, aren't they? They both end in .enabled - how hard can it be to figure out how to disable them? :)

Are you sure that .pbmode.enabled is IGNORED in that case?? Even if .pbmode.enabled is false?

I no longer know dude. I've almost had enough of section 0400.

yeah, but come on, the pref names are pretty clear, aren't they? They both end in .enabled - how hard can it be to figure out how to disable them?

I'm changing it to this - people can work it out for themselves
/* 0420: enable Tracking Protection
 * [1] https://wiki.mozilla.org/Security/Tracking_protection
 * [2] https://support.mozilla.org/en-US/kb/tracking-protection-firefox ***/
user_pref("privacy.trackingprotection.pbmode.enabled", true);
user_pref("privacy.trackingprotection.enabled", true);

I've looked at the new 0400 and these are my nits:

0401: enable extension blocklist, but sanitize blocklist url - extension blocklist sounds like it is a blocklist for blacklisted extensions, but it's just the "old" but still used version of the blocklist ie it contains blocked addons, plugins, gfxitems and revoked certs. (open blocklist.xml in an editor and see for yourself)

a better title would be "enable Firefox' blocklist" for example

the default indicators (that you already said you don't want to add) would be nice for 0420 + 0422

the rest is nice - good work! thx!


Updated setup.py to add and link cuda libraries

Changes made:

Added a custom step when building the wheel for DeepView.Predict

This step ensures that the habitat_cuda library's rpath looks for the CUDA related libraries in the Python package directory directories and not the local directories. See screenshot below for the output of ldd

Also reverted the rpath to original path after the wheel is built in case a user is doing an editable install/development

Added extras_requires that include the necessary CUDA libraries for each respective version of CUDA.

To install this on your machine, go to the analyzer directory and run pip install ".[cuda117]" . This will install DeepView.Predict in your Python environment.
 Run ldd on the habitat_cuda.so found in that directory

Added a build script and updated the EC2 runner yaml to use said script
Added better tagging of the wheels so it is obvious which Python and CUDA versions were used to build it

Added an additional check on import to tell users if the runtime libraries are not connected


TypeError: this.elem.datetimepicker is not a function

I'm submitting a ...  (check one with "x")
[ X] Bug report => search github for a similar issue or PR before submitting
[ ] Feature request
[ ] Other, please describe

Tell about your platform

eonasdan-bootstrap-datetimepicker version : 4.17.47
Vue.js version : 2.4.4
Browser name and version : Chrome|Firefox
This package version : 3.1.2

Current behavior
Adding it as a component (inside a component file) and it doesn't work. An empty input box shows up, but that's it. Here's the exception I see on the console:
vue.esm.js?65d7:476 [Vue warn]: Error in mounted hook: "TypeError: this.elem.datetimepicker is not a function"
found in
`
--->
   <DatetimeField> at src/components/core/fields/datetimeField.vue

     <Formu> at src/components/core/form/Formu.vue

       <App> at src/App.vue

         <Root>

`
Expected behavior
Should work as described in the documentation
Minimal reproduction of the problem with instructions
Follow the documentation. (README.md)

@fagubla
Are you using webpack ?
Then you should follow the instructions in readme.
https://github.com/ankurk91/vue-bootstrap-datetimepicker#using-webpack
// webpack.config.js
plugins: [
    new webpack.ProvidePlugin({
      Vue: ['vue/dist/vue.esm.js', 'default'],
      jQuery: 'jquery',
      'window.jQuery': 'jquery',
      $: 'jquery',
      moment: 'moment',
    }),
  ]

@ankurk91  thanks. It's working.

@ankurk91 Any hints on how to make this work with browserify?

I have no experience with browserify.
I just found these links,
https://github.com/browserify/browserify/issues/868
https://github.com/thlorenz/browserify-shim

i'm getting same error and im using vue-cli how to solve it?

@rvasoya
I have no experience with vue-cli, always do custom webpack configuration.
I believe you are using some webpack template, but which one ?
https://github.com/vuejs-templates/webpack-simple
https://github.com/vuejs-templates/webpack
Ultimately you need to configure webpack described in README.md

@ankurk91 Thanks for the answer. Sadly I didn't succeed with that browserify setup, however I had some other priorities so didn't spent too much time on that one - read: maybe it's possible to make this work :D

i'm using
https://github.com/vuejs-templates/webpack

You need to edit
https://github.com/vuejs-templates/webpack/blob/develop/template/build/webpack.prod.conf.js
Something like this -
https://gist.github.com/anonymous/9417e6dce06acad13ca557460dabd6a3

solved it by using it inside webpack.base.conf.js.
Thnx


SDL_Mixer freezes any program if fadeout is followed by play

This bug report was migrated from our old Bugzilla tracker.
Reported in version: 2.0.0
Reported for operating system, platform: Windows (XP), x86
Comments on the original bug report:
On 2014-05-17 04:37:04 +0000,  wrote:

According to the documentation, if a fadeout is applied to a playing music stream, and then a new music file is played, Mixer will wait until the first stream has finished fading out before playing the second.
This is correct.
However it also freezes all program activity while it fades out.
This does not occur if the fadeout is not followed by a play, or if the second stream of music is played without fading out the first.

On 2014-05-17 04:37:50 +0000,  wrote:

(mingw32, x86, GCC, 4.8).

On 2016-01-22 03:19:47 +0000,  wrote:

Resolved as of sdl 2.04

On 2016-01-22 03:20:33 +0000,  wrote:

Sorry, accidentally closed this - still active. Mistook for another bug.

I believe this is fixed for the latest release.


uptime-kuma files in centos

⚠ Please verify that this question has NOT been raised before.

[X] I checked and didn't find similar issue

🛡 Security Policy

[X] I agree to have read this project Security Policy

📝 Describe your problem
I like to change password and update uptime-kuma, but I can not find where this is installed in centos 8. I didn't use docker but regular installation. I even don't know what to search which files.
Can anyone help, how to change password and update?
📝 Error Message(s) or Log
no error logs
🐻 Uptime-Kuma Version
don't know
💻 Operating System and Arch
centos 8
🌐 Browser
firefox
🖥 Deployment Environment

Runtime: centos 8
Database: mariadb
Filesystem used to store the database on: linux
number of monitors: 6

I found out for both.
https://github.com/louislam/uptime-kuma/wiki/Reset-Password-via-CLI

You already answered your question about the password reset.

how to [..] update

Please refer to our wiki https://github.com/louislam/uptime-kuma/wiki/🆙-How-to-Update
Think this resolves both issues. => Closing as resolved
If our docs are unclear on something it would be greatly to get more direct feedback where you were confused..


build fails after rename of pawelwiejkut/bw_remove_charters

Errors for some days like this from https://github.com/dotabap/dotabap-list/actions/runs/11361695090/job/31601954459#step:4:2042
GitHub fetch pawelwiejkut/bw_remove_charters
Error: Server responded to https://api.github.com/repositories/220662333 with status code 403:
Request forbidden by administrative rules. Please make sure your request has a User-Agent header (https://docs.github.com/en/rest/overview/resources-in-the-rest-api#user-agent-required). Check https://developer.github.com/ for other possible causes.
New name of repo: "pawelwiejkut/bw_remove_characters"

thanks, fixed with https://github.com/dotabap/dotabap-list/commit/9c1b9c642626730df441fd0845c7b45db9767ce7


A7-1-2:  Qualifier cannot be declared constexpr

Affected rules

A7-1-2

Description
False positive reported for the following test case. In the example, below, a712 must be constexpr for value to be declared constexpr. However, it is not possible to declare parameters (easily) as constexpr. The mitigation for this issue is likely that cases where it is not possible to declare the qualifier as constexpr.
Example
class A7_1_2 {
 public:
  constexpr auto GetValue() const noexcept { return value_; }
  void SetValue(int32_t value) noexcept { value_ = value; }
 private:
  int32_t value_;
};
std::ostream &operator<<(std::ostream &os, const A7_1_2 a712) noexcept {
  const auto value = a712.GetValue(); // Variable value could be marked 'constexpr'.
  os << value;
  return os;
}

This is a duplicate of #789, and has been fixed by #794.

Note: this is because we previously weren't considering whether the qualifier to a call could be a compile-time constant.


Use INSTALL_PREFIX rather than DESTDIR

DESTDIR doesn't work on OpenSSL

Checklist

[x] documentation is added or updated
[x] tests are added or updated

It doesn't work?  @levitte do you want to fix that?
The fix, if needed, should also fix the MMS line that follows.
And we need you to add "CLA: trivial" to your commit message.  I agree this is trivial.
Thank you!

DESTDIR is intended to work; the submitter should indicate how they are attempting to use it and what the observed failure is.

This looks like a misunderstanding more than anything else.  I'm closing.
@FireBurn, please raise an issue where you explain what's going wrong.

I've created https://github.com/openssl/openssl/issues/4506


Scopes not working on HasManyThrough relationship

Laravel Version: 7.20.0
PHP Version: 7.4.5
Database Driver & Version: mysql 5.7.29

Description:
Let's say I have a hasManyThrough relationship as follows:
User -> Post -> Comment

Comment has a scope called published()
In other types of relationships like hasMany, I can use scopes:
$post->comments()->published()->get()
But if the relationship is hasManyThrough, it throws an error:
$user->comments()->published()->get()
exception: "BadMethodCallException"
file: "/project/vendor/laravel/framework/src/Illuminate/Support/Traits/ForwardsCalls.php"
line: 50
message: "Call to undefined method Illuminate\Database\Eloquent\Relations\HasManyThrough::published()"

Steps To Reproduce:
Edit: See second comment for correct configuration (https://github.com/laravel/framework/issues/33555#issuecomment-660455991)
Let me know if you need any other information

Please share the migrations.

Hi @driesvints , there are two more information that may help debug this:

It's a polymorphic hasManyThrough
We are using UUIDs

Do you think any of the above would affect it?
You may disregard my original issue and see the information in this new comment instead as it is exact to what we have, I just changed the table and model names to not expose the actual schema of my company. The "middle" model (Post) is polymorphic, it can belong to either a Team or a User.
Team model and migration
class Team
{
    public function posts()
    {
        return $this->morphMany(Post::class);
    }
}

Schema::create('teams', function (Blueprint $table) {
    $table->uuid('id');
    $table->string('name');
    $table->primary('id');
});

User model and migration
class User
{
    public function posts()
    {
        return $this->morphMany(Post::class);
    }
}

Schema::create('users', function (Blueprint $table) {
    $table->uuid('id');
    $table->string('name');
    ...
    $table->primary('id');
});

Post model and migration
class Post
{
    public function ownerable()
    {
        return $this->morphTo();
    }
}

Schema::create('posts', function (Blueprint $table) {
    $table->uuid('id');
    $table->string('ownerable_type');
    $table->uuid('ownerable_id');
    $table->string('name');
    $table->longText('content');
    $table->primary('id');
});

Comment model and migration
class Comment
{
    public function post()
    {
        return $this->belongsTo(Post::class);
    }
}

Schema::create('comments', function (Blueprint $table) {
    $table->uuid('id');
    $table->uuid('post_id');
    $table->longText('content');
    $table->primary('id');
});

Please share the correct Team::posts() relationship.

In your User model
return $this->hasMany(Post::class, User::class)
Is the second argument of hasMany not meant to be related column name?

Closing this issue because it's inactive, already solved, old or not relevant anymore. Feel free to reply if you're still experiencing this issue and we'll re-open this issue.

Hi @staudenmeir and @myckhel yes please disregard my first comment and refer to my second comment instead for the proper configuration. It still doesn't work

I don't think it works because we haven't supported it yet. It's ambiguous. Is the scope supposed to apply to the far model or the in between model? You're trying to apply it to the in between model but I would expect it to apply to the child model.

Hi @taylorotwell , sorry for the ambiguity in my report. I am applying the published scope to the child model instead of the in-between model. I have updated my second comment to reflect this more clearly

Hi @taylorotwell and @driesvints this still isn't fixed, hope we can reopen the issue. Let me know what other information is needed to debug this. Thank you!

    public function scopePublished(Builder $query)
    {
        return $query->whereNotNull('published_at');
    }

Hi @dkulyk as far as I know you do not need to return the query object in scopes. I have been using scopes without returning the query object and it works on all instances

@dkulyk was pointing out that your scope method needs to be named scopePublished(), not published().

https://laravel.com/docs/7.x/eloquent#local-scopes

Hi @staudenmeir and @dkulyk , so sorry I had to rewrite the code for this issue since I couldn't share the actual code of my company. In my actual code it is correctly scopePublished, I updated my second comment to reflect this. Unfortunately, it is still not working

Where is your comments relation for User?

Hi @dkulyk I've updated the second comment to include the relation, and I'm pasting it as well here for your convenience:
    public function comments()
    {
        return $this->hasManyThrough(Comment::class, Post::class, 'ownerable_id')
            ->where('ownerable_type', 'users');
    }

Unfortunately I cannot do ->toSql() because of the error of this issue:

However, $post->comments()->published()->toSql(); works:
select * from `comments` where `comments`.`post_id` = ? and `comments `.`post_id ` is not null and `published_at` is not null order by `created_at` desc

Maybe you are using any custom traits or anything else?

I only have two traits in the middle polymorphic model:

SetsUuidWhenCreating which sets a UUID to the id field when ::creating
and Spatie's HasTags

On the end model (Comment) it only has SetsUuidWhenCreating
User model there are a few but I tried removing all of the traits and the error is the same 🤔

Can you reproduce the issue on a fresh Laravel installation?

Hi @dkulyk and @staudenmeir , thank you very much for helping me debug this.  I just flipped the order of the first 2 parameters in my ->hasManyThrough() call. Alas, the joys of programming.
If only I could just copy the actual code you might have spotted it too, but since I had to recreate the logic when reporting it here (to keep my company's code confidential) I subconsciously fixed it while writing the issue here.
Thank you again for the time you spent helping out on this issue.


After installed, it will remove some modules from node_modules folder

After execute command: npm install react-native-vector-icons --save，it will remove some modules from node_modules folder， I must execute command: npm install, is there something wrong?

Use yarn instead npm.
To install vector icons: yarn add react-native-vector-icons
To recover your missing node_modules just run yarn in your project root folder.

Hi, react-native-vector-icons will not remove any packages itself, but your package manager might move them around or prune redundant packages. Nothing I can do anything about 👍 In general you shouldn't mix usage of npm and yarn.


GH-260, PTRENG-3557. Password is required, validation is offloaded to the Artifactory side

Fixes #260
Readme and resource docs are modified accordingly.
Descriptions added to all schemas elements, to make the transition to auto-generated documentation easier in the future.

So if I want to create my users with artifactory, and make them follow the password reset procedure to actually log in, this will not try to overwrite their password after they reset it?

@jcogilvie, correct. Test scenario for your particular case:

Create a new user with Artifactory provider, set a password:

resource "artifactory_user" "test-user" {   name     = "terraformuser"   email    =<EMAIL_ADDRESS> groups   = ["readers"]   password = "MyPassword1" }

Set password expiration policy for your Artifactory instance, with this call
Note: Without setting up an expiration policy you can't expire a user's password.

Expire the password for this user, using this API call
Note: you can expire passwords for a single user, set of users, or all the users in your instance.

Run terraform apply again. Actual result: After the first run you'll see this message Note: Objects have changed outside of Terraform. This is happening because this object has Computed fields, which are known only after the configuration was applied. It's not related to the password field. Run terraform apply again to double-check, and you will see the message: No changes. Your infrastructure matches the configuration.
Terraform won't detect (and try to undo) the password change because the password is not returned back in the API call and is not stored in the state.

Thank you for your contribution!

My process since submitting the bug has been:

Make terraform generate a random password.
Pass that into a user
Remove the password from the user (to remove it from state)
Have the user run through the "forgot password" flow

So, if I rewrite my terraform at this point, with a bunch of users who have 'forgotten' passwords from state, to provide (and then forget) another password, this will overwrite their passwords again, yes?
Is there a way to avoid all that?
I guess at this point it would be a feature request to generate a one-time password if a password isn't provided.

@jcogilvie - Believe me, this is a big headache for us too. RT password management has no end of caveats.
As for you case: You could import state for all users, which would get you current users and their encrypted passwords. Then, you could add new users/generate passwords for them.
@danielmkn - one change that could be made would be to add a field like on_login_pass_reset which would force the above user reset API. You could add that as a ticket
However, @jcogilvie Daniel is right: Password policy has to be turned on globally first.
As a side note to all parties: I See that our user resource is not in alignment anymore with the UI.
password management sucks and so far, any decision we make, someone is not happy

You could import state for all users, which would get you current users and their encrypted passwords. Then, you could add new users/generate passwords for them.

Unfortunately this would mean I need to maintain two categories of users indefinitely.
Our users are modules with accounts for various services.  Everyone in the company has a user module (over a hundred).  Their (throwaway) rt passwords are random_password resources.  So while yes, I could import artifactory users, I can't import the random_password resources that are used to provision them, meaning that I need to indefinitely skip the random_password object for only some users.
As of right now I can't really use this in this way.

We are legit open to ideas on this subject

Well, I think the way the documentation previously stated that it was working would have been perfectly acceptable for my use case.
I.e., if no password is provided:

if the user does not exist in state, generate one, create the user, and forget the password (or even invalidate it so the user has to "forget password")
if the user does exist in state, don't touch it

And if a password is provided:

if the user does not exist in state, use it
if the user does exist in state, set the password to the new one (although I recognize that "has it changed?" is a hard question in this context; I think "I have changed my pw via terraform" could be addressed with a "force overwrite password" flag of some sort)

I don't really see much use case for storing and managing a password for a user via raw tf code because plaintext is bad, so you're pretty much going to be forced to use something generated and then plumb it in... in which case why not have your module do the generation at create time?  Maybe with a flag or something for an option to forget it from state and stop managing it in the event it changes, and/or a flag to force the password to be overwritten by what tf thinks the password should be.


Remove deprecated storage keys from documentation

Remove the deprecated storage keys from server configuration documentation.
This also sort keys in the table to match ordering in the code.
An added mention in the backup documentation about supported filesystems

This pull request didn't trigger Jenkins as its author isn't in the whitelist.
An organization member must perform one of the following:

To have this branch tested by Jenkins, use the "ok to test" command.
To have a one time test done, use the "test this please" command.

Those commands are simple Github comments of the format: "jenkins: COMMAND"

@albertodonato, you need to sign-off your commit. We're using kernel-style contribution rules with LXD.


Strange format behavior

Hello,
thank you very much for this plugin, it is very usefull !
I just have a question, I don't know if it is a bug or if this is the wanted behavior :
{% if is_front %}
            <header id="region-header" role="banner" style='background-image:url("{{ file_url(node.field_image_header.entity.fileuri) }}")'>
            {% else %}
                    <header id="region-header" role="banner">
                    {% endif %}

In this case, IF ELSE and ENDIF are not indented on the same level, where it would make more sense to me if it was...
Is it supposed to be like that ?
Thank you.

Hey @blackbart420, I just looked into this issue further and I believe the formatter wants a closing tag for the header within each block of the if statement which would break your code.
Another way to write it, so it gets formatted properly is:
<header id="region-header" role="banner" {% if is_front %}style='background-image:url("{{ file_url(node.field_image_header.entity.fileuri) }}")'{% endif %}>

Sorry this is not ideal but thank you for raising the issue!

Hi @mblode !
Actually, your way of writing it is good enough, thank you :)


⚠ Bofrost.fr has degraded performance

In 1e0bdda, Bofrost.fr (https://www.bofrost.fr) experienced degraded performance:

HTTP code: 200
Response time: 1572 ms

Resolved: Bofrost.fr performance has improved in b8243a3 after 7 minutes.


Deletion of all resources to an event

There are some situations that we might need to delete all resources belong to an event, for instance sometimes events are created for only particular meeting, demonstration and etc, at this point it might be good idea to remove all instances of that event and keep one main endpoint such as (beta.ntp-event.dk), closing events does not remove resources of VMs and dockers.

It is interesting found that even we close the event the associated link resides for example I have created test.ntp-event.dk and close it. Even it is closed the domain accessible, I think it is not normal behaviour. Am I right @kdhageman ?

It is interesting found that even we close the event the associated link resides for example I have created test.ntp-event.dk and close it. Even it is closed the domain is accessible, I think it is not normal behaviour. Am I right @kdhageman ?

I am not sure I fully understand, so please confirm if this is correct: you create an event (named test) and afterwards close it? And you observed that the webpage (test.ntp-event.dk) is still available after closing it? If that is indeed the situation, this should not happen.

Yeah, that's the case, unfortunately .

As discussed, the 404 page is expected behavior, so I am closing this issue


Bad formatting adding multiple properties to start of object literal

TypeScript Version:  As of #26588
Code
In codeFixCannotFindModule_generateTypes_all.ts:
{
    "compilerOptions": {
        "baseUrl": ".",
        "paths": { "*": ["types/*"] },
}
}

Expected behavior:
Closing brace of "compilerOptions" is indented.
Actual behavior:
Not indented.

I want to contribute to this project. Can I take up this issue?