Can docker log levels be made useful by actually filtering by level?

mag 21 16:58:17 computer dockerd[13008]: time="2019-05-21T16:58:17.345353593+02:00" level=info msg="ccResolverWrapper: sending new addresses to cc: [{unix:///var/run/docker/containerd/containerd.sock 0 <nil>}]" module=grpc

This is a log line from docker when started, configured to have the journald driver.

As you can see, it logs the time as text, which is completely useless since journald logs the time as well.

Also, the log level is expressed as text instead of actual log level (that would show up red in the terminal).

This means that I can’t filter logs by log level.

Is there a way to configure it to log decently, using the log level instead of just writing what log level that would have been, if it had been using log levels?

How to check if DFA is actually a correct model of the intended system?

Suppose I have modeled a deterministic finite automaton of my system. How can I check if the traces generated by this system, actually represent the model I had in mind?

For example, say I have DFA A which models a vending machine. To ensure I did not model any wrong transitions, is coming up with (safety/liveness) specifications and performing verification the only method I can follow to ensure my model is correct? Many thanks.

What does module:disable actually do?


I seem to be having trouble disabling modules on my M2 2.3.1 store. Example: I had installed the CommerceBug development module but wanted to test my site without it so I ran module:disable Company_Commercebug.

Magento reported that the module was disabled. (I then ran the usual setup:upgrade, deleted all cache/generated/static directories and cleared all redis caches), but I found that the module was still outputting its CSS and JS files via the frontend.

This behaviour only stopped when I uninstalled the module using module:uninstall.

There is a good explanation of what module:uninstall does in the Magento Dev Docs but there is not an equivalent explanation for module:disable.

So what does module:disable actually do? Is it meant to prevent CSS/JS/etc. from being included? How does it differ from “Disable module output” in the admin panel?

I’m actually lost regarding inductions

Basically, it’s what it says in the title, could someone solve step by step this induction? It would be even better with an expanation for said steps, but it’s not all that needed, I want to read the solution mostly to decipher how to solve it, since I have a few questions regarding Inductive Base, demonstration through hipothesis, and thesis… Esentially everything. Here’s the problem: 0+2+4+…+2n = n(n+1), whereas n is a Natural.

Why are the terms filled when they are actually empty?

Below is the JSON output of a product I am having the issue with:

  {      "StkGrupKodu1" : "10090",      "StokAdi" : "7 Parça Kombine Anahtar Takımı",      "StkGrupKodu2" : "",      "SiparisVerilebilir" : true,      "StokMiktari" : 0,      "StkGrupKodu4" : "",      "StokTipiAdi" : "Ticari Mallar",      "KDVOrani" : 18,      "StokTipi" : "00000",      "DovizCinsi" : "EUR",      "Fiyat" : "34.00000",      "StkGrupKodu3" : "",      "StkGrupKodu5" : "",      "PasifStok" : false,      "EskiBilgileri" : {         "EskiStokKodu" : "",         "DegistirmeTarihi" : "1920-04-23T00:00:00"      },      "StokKodu" : "JBM50563"   }, 

In this e-commerce system, I am consuming a web service and creating corresponding products. With a few products such as the above and a few others, I am having this dreadful issue. As you can see, StkGrupKodu2 and StkGrupKodu3 are empty but when I go to the edit page of the product, it’s not empty. You can see from the screenshot below:

terms issue

This is the code I am using to associate terms with products

foreach ($  excel_products as $  e) {     $  req = \Drupal::httpClient()->get("".$  e->stokkodu);     $  res = $  req->getBody();     $  res = json_decode($  res);     $  data = $  res->Data[0];     $  sid = \Drupal::database()->select("commerce_store_field_data", "csfd")->fields("csfd", ["store_id"])->condition("default_currency", ($  data->DovizCinsi == "TRL")?"TRY":$  data->DovizCinsi)->execute()->fetchCol();     $  product = Product::create(["type" => "default"]);     <snip>     if (!empty($  data->StkGrupKodu1)) {         $  tid_1 = \Drupal::database()->select("taxonomy_term__field_stok_grup_kodu", "ttfsgk")->fields("ttfsgk", ["entity_id"])->condition("field_stok_grup_kodu_value", $  data->StkGrupKodu1)->execute()->fetchCol();         $  tid_1 = (!empty($  tid_1[0]))?$  tid_1[0]:"";     }     if (!empty($  data->StkGrupKodu2)) {         $  tid_2 = \Drupal::database()->select("taxonomy_term__field_stok_grup_kodu", "ttfsgk")->fields("ttfsgk", ["entity_id"])->condition("field_stok_grup_kodu_value", $  data->StkGrupKodu2)->execute()->fetchCol();         $  tid_2 = (!empty($  tid_2[0]))?$  tid_2[0]:"";     }     if (!empty($  data->StkGrupKodu3)) {         $  tid_3 = \Drupal::database()->select("taxonomy_term__field_stok_grup_kodu", "ttfsgk")->fields("ttfsgk", ["entity_id"])->condition("field_stok_grup_kodu_value", $  data->StkGrupKodu3)->execute()->fetchCol();         $  tid_3 = (!empty($  tid_3[0]))?$  tid_3[0]:"";     }     $  tids = [$  tid_1, $  tid_2, $  tid_3];     $  tids = array_filter($  tids);     <snip>     foreach ($  tids as $  tid) {         $  product->field_stok_grup_adi[] = [             "target_id" => $  tid,         ];     }   <snip> } 

What am I doing wrong or missing?

How to trigger SP’s default form validation without actually submitting the form?

I’m aware that I could simply override the SaveAction, and provide my own validation for all of the fields, but is there a way to trigger SharePoint’s default form validation without actually submitting the form?

Similar questions have been posted here and on other sites, but I have not yet seen a solution which isolates the form’s default SharePoint validation.

It would be beyond helpful to understand how to accomplish this, so that I can both share a working solution for a custom attachments table solution with the community and implement this in a SP2013 on prem project I’m currently working on.


Which “anti-lie-detection” features actually affect Zone of Truth?

D&D 5e has a handful of spells and features meant to protect the user against lie-detection magic. The examples I’m aware of are the Glibness spell and the Mastermind Rogue’s Soul of Deceit subclass feature. Specifically, Glibness says:

[…] no matter what you say, magic that would determine if you are telling the truth indicates that you are being truthful.

Soul of Deceit provides an identical feature, but then goes a bit further:

[…] no matter what you say, magic that would determine if you are telling the truth indicates you are being truthful if you so choose, and you can’t be compelled to tell the truth by magic.

At first glance, these “anti-lie-detector” features seem designed to defeat Zone of Truth. I certainly thought so when I wrote this answer. However, as the comments on that answer rightly pointed out, Zone of Truth is not precisely a lie-detection spell, and the precise interaction between that spell and these features is not clear. I’m going to quite the full text of the spell since any of it might turn out to be important:

You create a magical zone that guards against deception in a 15-foot-radius sphere centered on a point of your choice within range. Until the spell ends, a creature that enters the spell’s area for the first time on a turn or starts its turn there must make a Charisma saving throw. On a failed save, a creature can’t speak a deliberate lie while in the radius. You know whether each creature succeeds or fails on its saving throw.

An affected creature is aware of the spell and can thus avoid answering questions to which it would normally respond with a lie. Such a creature can be evasive in its answers as long as it remains within the boundaries of the truth.

In short, a failed save causes the following:

  1. The affected creature can’t lie
  2. The affected creature is aware of the compulsion
  3. The caster knows the creature failed their save

while a successful save only alerts the caster that the save was passed. Importantly, every creature in the spell’s area makes this saving throw even if they are immune to all effects of the spell.

The problem is that Zone of Truth doesn’t directly tell the caster whether the affected creature is lying or not. It tells the caster whether or not the creature has failed their saving throw against the spell. So despite the name of the spell, it’s not clear whether this is “magic that would determine if you are telling the truth”. The extra clause of Soul of Deceit seems like it should clearly defeat the spell’s compulsion against lying, but beyond that it’s not clear what other effects either Soul of Deceit or Glibness protect against.

So, assuming the creature fails their saving throw and is affected, to what extent does either Glibness or Soul of Deceit protect the affected creature from the effects of Zone of Truth? Specifically, do either of these allow the affected creature to speak a deliberate lie, and if so, what information does the caster of Zone of Truth receive when they do so, and how does it differ from the information the caster would receive if the affected creature did not have the effect protecting them?

How to identify where XSS is actually executed?

So I have a reflected XSS vulnerability where I get a pop up by entering <script>alert(2)</script> in the search field. I can’t see this payload (‘2’) anywhere on the screen, neither if I view source.

What would be the correct approach to debug this XSS and find out where is the location it’s being executed? Normally I would just open Developer Tools and use ‘Pick an element on the web page’ and click on payload and it would show, but in this case I don’t know where it’s located.

I imagine I could use breakpoints.

What does these lines from logcat actually mean

2567  2567 I FIPS_bssl: FIPS approved mode (1) | 2567 | /system/bin/eris 2567  2567 I eris    : 00[LIB] NCONF_new 2567  2567 I eris    : 00[KNL] kernel-netlink plugin might require CAP_NET_ADMIN capability 2567  2567 I eris    : 00[LIB] loaded plugins: androidbridge charon android-log openssl fips-prf random nonce pubkey pkcs1 pkcs8 pem xcbc hmac ctr gcm kernel-netlink socket-default eap-identity eap-mschapv2 eap-md5 eap-gtc eap-tls eap-aka eap-simaka-reauth eap-simaka-pseudonym 2567  2567 I eris    : 00[JOB] spawning 16 worker threads 

from the start: why the number 2567 repeats itself in every line? what the “I” (capital i) means? Why after the FIPS_bssl all the words are eris? What does the LIB,KNL,JOB mean? And in general what it looks like eris is doing?

Here is another logcat after I killed eris and the system server (861) + init restart it again

04-28 16:25:13.359  2567  2567 I eris    : 00[DMN] signal of type   SIGTERM received. Shutting down 04-28 16:25:13.359  2567  2567 I eris    : 00[DMN] Cleaning up! 04-28 16:25:13.379  2567  2567 I eris    : 00[LIB] NCONF_free 04-28 16:25:13.379   861  2563 D ErisClient -- ErisClient: sendServiceReport() ERIS_DAEMON_STOPPED 04-28 16:25:13.389   861  2563 D ErisClient -- ErisClient: DaemonRunner:run() restart daemon 04-28 16:25:13.389   861  2563 D ErisClient -- ErisClient: stopService() 04-28 16:25:13.389   861  2563 D ErisClient -- ErisClient: SetNatKeepaliveAlarm off 04-28 16:25:13.389   861  2563 D ErisClient -- ErisClient: DaemonRunner:exit() 04-28 16:25:13.389   861  2563 D ErisClient -- ErisClient: Ignore exception 04-28 16:25:13.409   861 10521 D EPDG -- [IPSECADAPTER_ERIS]: IPSecAdapterForEris:onServiceChanged() 04-28 16:25:13.409   861  2562 D EPDG -- [IPSECADAPTER_ERIS]: onIpSecAdapterServiceStatusChanged() Service ChangedService stopped 04-28 16:25:13.499   861  2563 D ErisClient -- ErisClient: startService() 04-28 16:25:13.499   861 10522 D ErisClient -- ErisClient: DaemonRunner:run() 04-28 16:25:13.499   861 10522 D ErisClient -- ErisClient: DaemonRunner:run() stopping daemon... 04-28 16:25:13.509   861 10522 D ErisClient -- ErisClient: DaemonRunner:run() starting daemon... 04-28 16:25:13.709   861 10522 D ErisClient -- ErisClient: DaemonRunner:run() daemon is started 04-28 16:25:13.709   861 10522 D ErisClient -- ErisClient: sendServiceReport() ERIS_OK