Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Activity for Alexei
Type | On... | Excerpt | Status | Date |
---|---|---|---|---|
Comment | Post #281385 |
Possible interesting reading: https://cybersecurity.ieee.org/blog/2016/06/02/design-best-practices-for-an-authentication-system/ (more) |
— | almost 4 years ago |
Edit | Post #281381 | Initial revision | — | almost 4 years ago |
Question | — |
How to work with current entity changes when working with @ngrx/store and @ngrx/entity? I am fairly new to working with @ngrx pattern in Angular which is a state management pattern relying on Reactive Extensions. One of the convenient structures is @ngrx/entity which helps with managing record collections. One typical scenario in the application is to access of list of Foos and... (more) |
— | almost 4 years ago |
Edit | Post #281365 | Question closed | — | almost 4 years ago |
Comment | Post #281365 |
Unfortunately, this question is offtopic here as well, since it is not related to software development. Please, read [this help page](https://software.codidact.com/help/on-topic) for more details about what is on-topic and offtopic in this community. (more) |
— | almost 4 years ago |
Edit | Post #281341 |
Post edited: added relevant tag |
— | almost 4 years ago |
Comment | Post #281315 |
Ideally, always knowing created by and created on behalf of might be useful, but the whole impersonation thing is kind of an edge case. It is a necessary evil to quicker reproduce issues coming from the users and very few are able to activate it. All other flows should be executed with impersonation ... (more) |
— | almost 4 years ago |
Comment | Post #281308 |
As currently written, I also think this belongs more to meta than the main site. I will try to figure out a way to migrate it there and reopen it (have an issue with migration due to meta tags). (more) |
— | almost 4 years ago |
Comment | Post #281304 |
"As we do it: with logging" - this indeed seems to be the best approach. Just had a conversation with my boss and confirmed that such a solution was used for an important product that was externally audited. The audit said it is fine to allow users to fully impersonate someone else as long everything... (more) |
— | almost 4 years ago |
Edit | Post #281301 | Initial revision | — | almost 4 years ago |
Question | — |
How to properly deal with impersonation in a Web application? (security vs. usefulness for tech support) Context Our team has begun migrating a pretty old internal application and one aspect that got my attention is the impersonation. This is implemented as follows: - only administrators are allowed to impersonate someone else - impersonation means setting the current session user to the imperso... (more) |
— | almost 4 years ago |
Comment | Post #281192 |
@DerekElkins Yes, this can also happen and a smoke is complementary to the deployment using migrations. Also, production has a health monitoring in place which also checks that SELECTs can be performed against the database. (more) |
— | almost 4 years ago |
Comment | Post #281288 |
Besides the nice lexicographic order you get by default with YYYY-mm-dd, the timestamps are often extended with hour, minute, seconds, milliseconds. By starting with the year , adding them is done in a consistent way (see [this](https://www.w3.org/TR/NOTE-datetime)). (more) |
— | almost 4 years ago |
Comment | Post #281253 |
That playground is awesome. Also, I think that grouping the affected controls in a FormGroup makes perfect sense. Thanks. (more) |
— | about 4 years ago |
Comment | Post #281200 |
Storing function names in string and dynamically invoking those functions is not actually a nice thing (the linter and the transpiler cannot check if these functions actually exist). That's why I am asking if by chance I have missed something and had to rely on such a solution. (more) |
— | about 4 years ago |
Edit | Post #281232 | Initial revision | — | about 4 years ago |
Answer | — |
A: Not obligating http:// or https:// in a url field of a contact form `input type="url"` works like this by design: > An empty string ("") indicating that the user did not enter a value or that the value was removed. > A single properly-formed absolute URL. This doesn't necessarily mean the URL address exists, but it is at least formatted correctly. In simple te... (more) |
— | about 4 years ago |
Comment | Post #281202 |
@JohnDoea The first example (using fetch API) should replace your code using xhr. The example hardcodes the method (POST), but you can replace it if your own. (more) |
— | about 4 years ago |
Edit | Post #281202 |
Post edited: added the jQuery way |
— | about 4 years ago |
Edit | Post #281202 | Initial revision | — | about 4 years ago |
Answer | — |
A: Submitting a form via XHR/AJAX causes partial data arrival to email inbox (only HTML without input) I am guessing a little here. By not preventingdefault, the form will POST the data to the server. If you switch to AJAX you have to provide the body as per documentation. However, I do not remember to ever using the XMLHttpRequest directly, because there are wrappers to help you. One example us... (more) |
— | about 4 years ago |
Comment | Post #281199 |
What is contactForm.method containing? If it is 'POST', I do not see the request body to be sent to the server: https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/send (more) |
— | about 4 years ago |
Edit | Post #281200 | Initial revision | — | about 4 years ago |
Question | — |
How to enable or disable a bunch of reactive form controls? I want to conditionally disabled or not (enabled) a bunch of reactive form controls. However, I have noticed that neither `enable` or `disable` function has a boolean parameter to nicely conditionally disable a control (this is the solution I have seen in other frameworks to allow this, despite being... (more) |
— | about 4 years ago |
Comment | Post #281193 |
Have you tried using a heredoc string? https://stackoverflow.com/a/1848974 (more) |
— | about 4 years ago |
Edit | Post #281192 |
Post edited: fixed migrations table name |
— | about 4 years ago |
Edit | Post #281192 | Initial revision | — | about 4 years ago |
Question | — |
How to tackle database migrations failure during application initialization on production systems? Context My ASP.NET Core application got stuck in Production with a 5xx error. By inspecting the logs, I have noticed that a database error occurred during application initialization, namely a SQL Server access error. This happened because the application restarted and at that very moment, it t... (more) |
— | about 4 years ago |
Edit | Post #281188 | Initial revision | — | about 4 years ago |
Answer | — |
A: Are JavaScriptless forms accessible? As indicated by your source using (or not) JS is mostly independent of accessibility since the latter is obtained mainly through HTML and CSS. As a side note, while not using JavaScript is an option, you must also consider the performance and UX implications of this: - client-side validations p... (more) |
— | about 4 years ago |
Comment | Post #281180 |
@JohnDoea Yes, I think that is the way to define the message content type. (more) |
— | about 4 years ago |
Edit | Post #281180 | Initial revision | — | about 4 years ago |
Answer | — |
A: PHP emails are sent when $message is a string, but not when its an array As explained by manassehkatz, the message (aka the body) is a text in PHP (and many other programming languages). If your e-mails have a certain structure, you should create a function that takes that structure (i.e. your array) and generate a string from it. This is a good idea also from an arch... (more) |
— | about 4 years ago |
Edit | Post #281171 |
Post edited: removed rude acronym |
— | about 4 years ago |
Comment | Post #281168 |
A quick "frame challenge": Why not always insert a [UTC timestamp in the table](https://stackoverflow.com/questions/16609724/using-current-time-in-utc-as-default-value-in-postgresql) and [display the local time](https://stackoverflow.com/questions/36341060/convert-a-utc-timezone-in-postgresql-to-est-... (more) |
— | about 4 years ago |
Comment | Post #281158 |
I am a fan of keeping things simple. If there is no strong reason to rely on something else, why not have everything provided by the same provider: the client accesses the form hosted on example.com (your provider), fills the form and your script running on example.com sends an e-mail to your contact... (more) |
— | about 4 years ago |
Comment | Post #281158 |
I would go with "buying an email box from my domain registrar" because it seems to be the easiest + safest solution. As long as the contact form is not abused, I do not think you will ever run into trouble with the spam filters. You did not mention, but is the destination an e-mail address on your do... (more) |
— | about 4 years ago |
Comment | Post #281159 |
It is not clear what the exact problem is here. [This](https://logging.apache.org/log4net/release/manual/configuration.html) shows that it is possible to read the configuration from a file. Indeed this is a structured file (XML), not an "arbitrary data structure". Do you mean something like an YAML c... (more) |
— | about 4 years ago |
Edit | Post #281148 |
Post edited: added relevant tag |
— | about 4 years ago |
Comment | Post #281058 |
Do you receive a response from the server? Typically servers provide a response, except for the case when the connection cannot be made (timeout, explicit connection reset from the server). I think there is no exception, but an HTTP code that should be available if you read the response from the line... (more) |
— | about 4 years ago |
Edit | Post #281058 |
Post edited: added relevant tags |
— | about 4 years ago |
Comment | Post #281049 |
I think "traditional" is more appropriate than "standard" (see [International email](https://en.wikipedia.org/wiki/International_email) ). (more) |
— | about 4 years ago |
Comment | Post #281043 |
@JohnDoea Ok, so they are handling authentication behind the scene. `mail` seems to return only true or false (success), so I think the only option is to check (or ask your provider to) the e-mail logs which should contain the cause of the error. (more) |
— | about 4 years ago |
Comment | Post #281043 |
[This] might (https://stackoverflow.com/a/32413860/2780791) be relevant if my guess is right. (more) |
— | about 4 years ago |
Comment | Post #281043 |
There are many years since I have sent an e-mail using PHP, but I remember that e-mails required some kind of authentication to be treated correctly by the e-mail providers (they need to be sure that they come from the domain they seem to use). Failing to provide this, most of them reached the Spam ... (more) |
— | about 4 years ago |
Comment | Post #281025 |
I think you will get better search results using "contact form service" instead. Results indicate headlines like "custom forms with no server code", "simple contact form service" and others. All the solutions seem to allow the client to construct the form and use it as a third-party service. (more) |
— | about 4 years ago |
Comment | Post #281001 |
Indeed my post lacked important information about the usage. I edited the post, but your answer is very useful anyway. Thanks. (more) |
— | about 4 years ago |
Edit | Post #280998 |
Post edited: added further details for the question |
— | about 4 years ago |
Edit | Post #280998 | Initial revision | — | about 4 years ago |
Question | — |
What should healthcheck of an Web API application actually check? I have to add health checks to a rather new application (Web API, not a microservice) and I and a colleague are not agreeing about what other systems I should include in the check. This application is the beginning of the writing of a legacy one (will work side by side for a long transition period). ... (more) |
— | about 4 years ago |