#javascriptreliability — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #javascriptreliability, aggregated by home.social.
-
What's wrong with this JavaScript unhandled rejection?
What's wrong with this JavaScript unhandled rejection crashing Node. The JavaScript code returns a promise without catch. In JavaScript unhandled rejections can terminate the process.
#whatswrongwiththisjavascriptcode #javascriptbug #javascriptproductionbug #javascriptdebugging #javascriptbackend #javascriptcodereview #javascriptsecurity #javascriptperformance #javascriptreliability #javascri...
-
Why does this JavaScript negative zero exist?
Why does this JavaScript negative zero exist and break sign check. The JavaScript code checks if a value is negative with less than zero. In JavaScript -0 fails the check and passes as positive.
#whatswrongwiththisjavascriptcode #javascriptbug #javascriptproductionbug #javascriptdebugging #javascriptbackend #javascriptcodereview #javascriptsecurity #javascriptperformance #javascriptreliability #javasc...
-
What's wrong with this JavaScript JSON parse of numbers?
What's wrong with this JavaScript JSON parse of numbers losing precision. The JavaScript code parses JSON with large integers. In JavaScript numbers over 2^53 lose precision.
#whatswrongwiththisjavascriptcode #javascriptbug #javascriptproductionbug #javascriptdebugging #javascriptbackend #javascriptcodereview #javascriptsecurity #javascriptperformance #javascriptreliability #javascriptapi #...
-
What's wrong with this JavaScript prototype pollution?
What's wrong with this JavaScript prototype pollution from user merge. The JavaScript code merges user input into an object. In JavaScript __proto__ or constructor can pollute all objects.
#whatswrongwiththisjavascriptcode #javascriptbug #javascriptproductionbug #javascriptdebugging #javascriptbackend #javascriptcodereview #javascriptsecurity #javascriptperformance #javascriptreliability #jav...
-
What's wrong with this JavaScript RegExp stateful?
What's wrong with this JavaScript RegExp stateful with global flag. The JavaScript code reuses a regex with g flag. In JavaScript lastIndex persists and the next match starts from wrong position.
#whatswrongwiththisjavascriptcode #javascriptbug #javascriptproductionbug #javascriptdebugging #javascriptbackend #javascriptcodereview #javascriptsecurity #javascriptperformance #javascriptreliability #...
-
Why does this JavaScript trim not removing all whitespace?
Why does this JavaScript trim not removing all whitespace. The JavaScript code uses trim on user input. In JavaScript trim only handles space tab newline not unicode spaces.
#whatswrongwiththisjavascriptcode #javascriptbug #javascriptproductionbug #javascriptdebugging #javascriptbackend #javascriptcodereview #javascriptsecurity #javascriptperformance #javascriptreliability #javascriptapi ...
-
What's wrong with this JavaScript BigInt mixing with Number?
What's wrong with this JavaScript BigInt mixing with Number in a calculator. The JavaScript code adds BigInt and Number. In JavaScript this throws and crashes the app.
#whatswrongwiththisjavascriptcode #javascriptbug #javascriptproductionbug #javascriptdebugging #javascriptbackend #javascriptcodereview #javascriptsecurity #javascriptperformance #javascriptreliability #javascriptapi #jav...
-
Why does this JavaScript toFixed return string?
Why does this JavaScript toFixed return string in a sum. The JavaScript code uses toFixed for display and then adds the result. In JavaScript toFixed returns a string so addition concatenates.
#whatswrongwiththisjavascriptcode #javascriptbug #javascriptproductionbug #javascriptdebugging #javascriptbackend #javascriptcodereview #javascriptsecurity #javascriptperformance #javascriptreliability #javasc...
-
Why does this JavaScript Object is vs === for NaN?
Why does this JavaScript Object is vs === for NaN check. The JavaScript code uses === to detect NaN. In JavaScript Object.is is needed for NaN and negative zero.
#whatswrongwiththisjavascriptcode #javascriptbug #javascriptproductionbug #javascriptdebugging #javascriptbackend #javascriptcodereview #javascriptsecurity #javascriptperformance #javascriptreliability #javascriptapi #javascriptengineeri...
-
Why does this JavaScript WeakMap key garbage collected?
Why does this JavaScript WeakMap key garbage collected too early. The JavaScript code stores data in WeakMap keyed by object. In JavaScript without a strong reference the entry disappears.
#whatswrongwiththisjavascriptcode #javascriptbug #javascriptproductionbug #javascriptdebugging #javascriptbackend #javascriptcodereview #javascriptsecurity #javascriptperformance #javascriptreliability #ja...
-
Why does this JavaScript Object keys on array?
Why does this JavaScript Object keys on array returning string indices. The JavaScript code uses Object.keys on an array. In JavaScript keys are string numbers and holes are skipped.
#whatswrongwiththisjavascriptcode #javascriptbug #javascriptproductionbug #javascriptdebugging #javascriptbackend #javascriptcodereview #javascriptsecurity #javascriptperformance #javascriptreliability #javascriptapi #ja...
-
What's wrong with this JavaScript Array push return?
What's wrong with this JavaScript Array push return in a chain. The JavaScript code chains after push assuming it returns the array. In JavaScript push returns the new length not the array.
#whatswrongwiththisjavascriptcode #javascriptbug #javascriptproductionbug #javascriptdebugging #javascriptbackend #javascriptcodereview #javascriptsecurity #javascriptperformance #javascriptreliability #java...
-
What's wrong with this JavaScript setTimeout closure?
What's wrong with this JavaScript setTimeout closure in a loop. The JavaScript code creates timeouts in a loop with var. In JavaScript all callbacks see the final value.
#whatswrongwiththisjavascriptcode #javascriptbug #javascriptproductionbug #javascriptdebugging #javascriptbackend #javascriptcodereview #javascriptsecurity #javascriptperformance #javascriptreliability #javascriptapi #javascri...
-
Why does this JavaScript scheduler drift?
Why does this JavaScript scheduler drift in reporting. The JavaScript code mutates a Date object and reuses it, so every window shifts forward. In JavaScript jobs this breaks hourly aggregation.
#whatswrongwiththisjavascriptcode #javascriptbug #javascriptproductionbug #javascriptdebugging #javascriptbackend #javascriptcodereview #javascriptsecurity #javascriptperformance #javascriptreliability #javascript...
-
Why does this JavaScript scheduler drift?
Why does this JavaScript scheduler drift in reporting. The JavaScript code mutates a Date object and reuses it, so every window shifts forward. In JavaScript jobs this breaks hourly aggregation.
#whatswrongwiththisjavascriptcode #javascriptbug #javascriptproductionbug #javascriptdebugging #javascriptbackend #javascriptcodereview #javascriptsecurity #javascriptperformance #javascriptreliability #javascript...
-
Why does this JavaScript scheduler drift?
Why does this JavaScript scheduler drift in reporting. The JavaScript code mutates a Date object and reuses it, so every window shifts forward. In JavaScript jobs this breaks hourly aggregation.
#whatswrongwiththisjavascriptcode #javascriptbug #javascriptproductionbug #javascriptdebugging #javascriptbackend #javascriptcodereview #javascriptsecurity #javascriptperformance #javascriptreliability #javascript...
-
Why does this JavaScript scheduler drift?
Why does this JavaScript scheduler drift in reporting. The JavaScript code mutates a Date object and reuses it, so every window shifts forward. In JavaScript jobs this breaks hourly aggregation.
#whatswrongwiththisjavascriptcode #javascriptbug #javascriptproductionbug #javascriptdebugging #javascriptbackend #javascriptcodereview #javascriptsecurity #javascriptperformance #javascriptreliability #javascript...
-
Why does this JavaScript Proxy trap missing?
Why does this JavaScript Proxy trap missing for operation. The JavaScript code uses Proxy but does not trap all operations. In JavaScript some property access bypasses the proxy.
#whatswrongwiththisjavascriptcode #javascriptbug #javascriptproductionbug #javascriptdebugging #javascriptbackend #javascriptcodereview #javascriptsecurity #javascriptperformance #javascriptreliability #javascriptapi #javascri...
-
Why does this JavaScript eval in JSON parse?
Why does this JavaScript eval in JSON parse allowing code execution. The JavaScript code uses eval or Function to parse JSON. In JavaScript this executes any code in the string.
#whatswrongwiththisjavascriptcode #javascriptbug #javascriptproductionbug #javascriptdebugging #javascriptbackend #javascriptcodereview #javascriptsecurity #javascriptperformance #javascriptreliability #javascriptapi #javascrip...
-
Why does this JavaScript addEventListener stacking?
Why does this JavaScript addEventListener stacking without remove. The JavaScript code adds a listener on each render. In JavaScript listeners accumulate and fire multiple times.
#whatswrongwiththisjavascriptcode #javascriptbug #javascriptproductionbug #javascriptdebugging #javascriptbackend #javascriptcodereview #javascriptsecurity #javascriptperformance #javascriptreliability #javascriptapi #j...
-
Why does this JavaScript innerHTML XSS?
Why does this JavaScript innerHTML XSS from user content. The JavaScript code assigns user input to innerHTML. In JavaScript this executes any script in the string.
#whatswrongwiththisjavascriptcode #javascriptbug #javascriptproductionbug #javascriptdebugging #javascriptbackend #javascriptcodereview #javascriptsecurity #javascriptperformance #javascriptreliability #javascriptapi #javascriptengineering #java...
-
What's wrong with this JavaScript spread shallow copy?
What's wrong with this JavaScript spread shallow copy in state update. The JavaScript code uses spread to clone state. In JavaScript nested objects are still shared and mutations leak.
#whatswrongwiththisjavascriptcode #javascriptbug #javascriptproductionbug #javascriptdebugging #javascriptbackend #javascriptcodereview #javascriptsecurity #javascriptperformance #javascriptreliability #javascr...
-
What's wrong with this JavaScript regex?
What's wrong with this JavaScript regex in validation. The JavaScript pattern has catastrophic backtracking, so a single input can hang a worker. In JavaScript APIs this becomes a denial of service.
#whatswrongwiththisjavascriptcode #javascriptbug #javascriptproductionbug #javascriptdebugging #javascriptbackend #javascriptcodereview #javascriptsecurity #javascriptperformance #javascriptreliability #javascr...
-
Why does this JavaScript cache stampede?
Why does this JavaScript cache stampede under load. The JavaScript code recomputes values on expiry without a lock, so every request hits the database. In JavaScript services this melts the backend.
#whatswrongwiththisjavascriptcode #javascriptbug #javascriptproductionbug #javascriptdebugging #javascriptbackend #javascriptcodereview #javascriptsecurity #javascriptperformance #javascriptreliability #javascr...