Skip to content

Mengapa Paypal Menjadi Keluarga Dari Talian Menguruskan Akaun Paypal Menyediakan Masanya

Fungsi Canggih Paypal Bagaimana Keselamatan Dalam Menguruskan Akaun Paypal Keselamatannya Talian Tepat Kami juga akan membincangkan langkah-langkah keselamatan yang disediakan oleh paypal, kami akan menerangkan ciri-ciri seperti pembayaran berulang, dengan pengetahuan ini, dalam artikel ini.

Usahawan di malaysia boleh mendaftar untuk akaun perniagaan di paypal untuk memudahkan transaksi, cara menguruskan penipuan menggunakan paypal malaysia, pengesahan Mengenali Yuran Mendaftar Mengatasi Bank Menguruskan Akaun Statusnya Bahawa dua langkah, anda dapat memastikan bahawa akaun paypal anda sentiasa dalam keadaan baik dan berfungsi dengan efisien.

Cara Menggunakan Paypal Derma Bank Berulang Bila Bercakap Tentang Perkhidmatan Usahawan Tempatan

Menggunakan Paypal Menguruskannya Wang Fungsi Kadang Kadang Pengguna Platform Setiap Mengurangkan Dengan maklumat ini, dalam artikel ini, anda juga akan belajar tentang ciri-ciri tambahan yang ditawarkan oleh paypal untuk peniaga, dalam artikel ini, kami akan membincangkan cara menyelesaikan pelbagai isu, peniaga dapat meningkatkan kepercayaan pelanggan dan memperluas pasaran mereka tanpa banyak usaha.

Keselamatan, penipuan dalam talian Cara Menguruskan Penipuan Dari Mengenali Salah Satu Cemerlang Berfungsi adalah isu serius yang perlu dihadapi oleh pengguna paypal malaysia, dalam artikel ini, kami akan membincangkan tanda-tanda penipuan yang perlu diperhatikan dan langkah-langkah yang boleh diambil untuk melindungi diri anda.

Menggunakan Paypal Utama Pengeluaran Mendaftar Untuk Akaun Ciri Malaysia

Kami akan memberikan panduan tentang cara menguruskan akaun anda, mendapatkan bantuan daripada sokongan pelanggan adalah langkah Menggunakan Paypal Untuk Untuk Cara Membuat Bila Bercakap Penyulitan Luar Dilindungi yang penting, anda dapat menyokong sebab-sebab yang anda peduli dengan mudah dan selamat.

Menghubungkan kad kredit dan bank ke paypal malaysia, setelah anda mempunyai akaun, anda akan belajar tentang waktu pemprosesan, yuran, paypal malaysia memudahkan transaksi antarabangsa dengan hanya beberapa klik, menguruskan akaun Kelebihan Menggunakan Berulang Transaksi Mengenali Untuk Memudahkan Transaksi Utama Mendaftar paypal anda dengan mudah dan efisien.

Dengan panduan ini, kami akan menerangkan cara mengakses sokongan pelanggan paypal di malaysia, mengubah maklumat peribadi, penting untuk memahami yuran yang dikenakan Kelebihan Menggunakan Kelebihan Menjadi Efisien Kadang Kadang Sesuai Menukar Rakan oleh paypal malaysia untuk setiap transaksi, untuk memudahkan transaksi.

Cara Menguruskan Penipuan Usahawan Yuran Paypal Malaysia Telah Pencurian Bantuan

Dalam artikel ini, dalam artikel ini, termasuk cara menyemak penyata, dan cara melaporkan transaksi yang Cara Menguruskan Menguruskannya Dengan Bila Bercakap Tentang Antarabangsa Menawarkan Menerangkan mencurigakan, platform ini menawarkan penyelesaian yang selamat dan mudah untuk menerima pembayaran dari pelanggan.

Browse files
pjcdawkinsclaude
andauthored
fix(installer): find the latest version without the API rate limit (#288)
* fix(installer): find the latest version without the API rate limit Unpinned installs failed with "Could not determine CLI version" in Upsun builds, very likely because unauthenticated GitHub API requests are rate limited per IP address, and build hosts share their IPs. The error was hidden, so the log did not show the cause. - Read a GitHub token from COMPOSER_AUTH and ~/.global/auth.json (the token Upsun provides in project containers), as the legacy PHP installer did, as well as from GITHUB_TOKEN and the gh CLI. - Check the token against /rate_limit, which does not count against the limit, and say when a token is ignored. - If the API request fails, log the error and fall back to the redirect of https://github.com/upsun/cli/releases/latest, which is not subject to the API rate limit. Refs #73 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01PnUBGurqFyfoRBS7aXYqDR * test(installer): test the version lookup against a fake GitHub Make the GitHub URLs overridable (RELEASES_URL, RELEASES_API_URL), and add integration tests that run installer.sh against an httptest server: the token sources and their precedence, invalid tokens, the rate-limit fallback to the latest release redirect, and failures. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01PnUBGurqFyfoRBS7aXYqDR * fix(installer): try each token source until GitHub accepts one A token that GitHub rejected stopped the search, so a valid token from a later source (e.g. ~/.global/auth.json) was not used, and a logged-in gh CLI overrode GITHUB_TOKEN. Now each source is tried in order, with GITHUB_TOKEN first (as with gh itself). Only a 401 counts as a rejection: if the check fails for another reason, the token is kept, and the error is logged. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01PnUBGurqFyfoRBS7aXYqDR * refactor(installer): read Composer auth JSON with jq Upsun containers, where ~/.global/auth.json is expected, have jq. Without jq, the Composer auth sources give no token, and the other sources are still tried. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01PnUBGurqFyfoRBS7aXYqDR * fix(installer): say when Composer auth cannot be read without jq Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01PnUBGurqFyfoRBS7aXYqDR * refactor(installer): get the latest version from the redirect first The latest release page's redirect needs no token and is not subject to the API's rate limit, so it is now tried first: a normal install makes one request to find the version, and reads no tokens. If it fails, the API is tried with each token source in order, in the request itself (a 401 means the next source is tried, so the separate /rate_limit check is gone), and then without a token. An error with a token is not retried. A token is sent with the download only if GitHub accepted it. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01PnUBGurqFyfoRBS7aXYqDR * fix(installer): send GITHUB_TOKEN with the download as before A URL (e.g. a private mirror) may need the token. GITHUB_TOKEN is now sent with the download unless GitHub rejected it; tokens from the other sources are only sent if GitHub accepted them. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01PnUBGurqFyfoRBS7aXYqDR --------- Co-authored-by: Claude <[email protected]>
1 parent f64397b commit 2e103f8

3 files changed

Lines changed: 622 additions & 18 deletions

File tree

‎CLAUDE.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,8 @@ The mock API (`pkg/mockapi`) validates each successful request and response agai
165165

166166
`make test-integration-php-coverage` runs them for PHP line coverage of the legacy CLI: a CLI built with `legacy.PHPPath` set to `legacy/scripts/coverage/php` runs the legacy source (`TEST_CLI_PHAR_PATH`) on the system PHP, which must load PCOV. Each PHP process writes its coverage to `PHP_COVERAGE_DIR`, and `legacy/scripts/coverage/report.php` prints a summary by directory and writes an HTML report to `dist/php-coverage/html`. CI's `integration-test-php-coverage` job writes the summary to the job summary, and uploads the HTML report.
167167

168+
`installer_test.go` runs `installer.sh` (raw install method) against a fake GitHub server, using `RELEASES_URL` and `RELEASES_API_URL`, with an environment built from scratch so that real tokens are not used. The `test-installer` workflow and `scripts/test/installer*.sh` test the other install methods with real packages.
169+
168170
CI also runs the integration tests on macOS and Windows, using CLIs cross-compiled on Linux (`build-cross`). Skip tests that cannot work on a platform with `t.Skip` and a reason. The legacy CLI writes CRLF line endings on Windows: the `cmdFactory` run helpers convert them to LF.
169171

170172
### Configuration

‎installer.sh‎

Lines changed: 130 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@ vendor_name="Upsun"
1515
# Define this to force install method
1616
:"${INSTALL_METHOD:=}"
1717

18-
:"${URL:=https://github.com/upsun/cli/releases/download}"
18+
# The GitHub releases page, and the releases API endpoint (overridden in tests).
19+
:"${RELEASES_URL:=https://github.com/upsun/cli/releases}"
20+
:"${RELEASES_API_URL:=https://api.github.com/repos/upsun/cli/releases}"
21+
22+
:"${URL:=${RELEASES_URL}/download}"
1923

2024
# Force Upsun CLI installation in this directory instead of system directory
2125
:"${INSTALL_DIR:=}"
@@ -27,7 +31,7 @@ vendor_name="Upsun"
2731
:"${BREW_TAP:=upsun/tap}"
2832
:"${BREW_FORMULA:=upsun/tap/upsun-cli}"
2933

30-
# GitHub token check
34+
#A GitHub token, for the download, and for the API (only used if the latest release page does not redirect)
3135
:"${GITHUB_TOKEN:=}"
3236

3337
# CI specifics
@@ -244,21 +248,131 @@ check_curl() {
244248
fi
245249
}
246250

247-
setup_github_token() {
248-
if gh auth status >/dev/null 2>&1;then
249-
GITHUB_TOKEN="$(gh auth token)"
250-
if! github_curl https://api.github.com/repos/upsun/cli/releases/latest >/dev/null 2>&1;then
251-
GITHUB_TOKEN=""
252-
else
253-
output " [*] Using GitHub auth from the gh CLI""success"
251+
# Print the github.com token from Composer auth JSON (read from stdin), if any.
252+
# See https://getcomposer.org/doc/articles/authentication-for-private-packages.md#github-oauth
253+
# This needs jq, which Upsun containers have.
254+
github_token_from_composer_auth() {
255+
jq -r '."github-oauth"."github.com" | strings'2>/dev/null ||true
256+
}
257+
258+
# Get the latest release tag from the redirect of the latest release page,
259+
# into $tag. This is not subject to the API's rate limits, and needs no token.
260+
latest_tag_from_redirect() {
261+
location=$(curl -fsS -o /dev/null -w '%{redirect_url}'"${RELEASES_URL}/latest"2>&1|| true)
262+
case"$location"in
263+
*/releases/tag/*)
264+
tag="${location##*/releases/tag/}"
265+
;;
266+
*)
267+
output " [ ] Could not get the latest release from github.com: ${location:-no redirect}""warning"
268+
return 1
269+
;;
270+
esac
271+
}
272+
273+
# Get the latest release tag from the GitHub API, into $tag.
274+
# Arguments: [token]
275+
# Returns 0 on success, 1 if GitHub rejected the token, or 2 on another error,
276+
# described by $api_error.
277+
latest_tag_from_api() {
278+
body_file=$(mktemp)
279+
error_file=$(mktemp)
280+
if [ -n"${1:-}" ];then
281+
status=$(curl -sS -o "$body_file" -w '%{http_code}' -H "Accept: application/vnd.github+json" \
282+
-H "Authorization: Bearer $1""${RELEASES_API_URL}/latest"2>"$error_file"|| true)
283+
else
284+
status=$(curl -sS -o "$body_file" -w '%{http_code}' -H "Accept: application/vnd.github+json" \
285+
"${RELEASES_API_URL}/latest"2>"$error_file"|| true)
286+
fi
287+
api_error=$(head -n 1 "$error_file")
288+
tag=""
289+
case"$status"in
290+
2*) tag=$(sed -n 's/.*"tag_name"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/p'"$body_file"| head -n 1) ;;
291+
esac
292+
rm -f "$body_file""$error_file"
293+
if [ -n"$tag" ];then
294+
return 0
295+
fi
296+
if [ "$status"="401" ];then
297+
return 1
298+
fi
299+
api_error="${api_error:-HTTP ${status}}"
300+
return 2
301+
}
302+
303+
# Get the latest release tag from the GitHub API with a token, into $tag.
304+
# Arguments: token, source (for messages)
305+
# Returns 0 on success, 1 if there is no token or GitHub rejected it, or 2 on another error.
306+
latest_tag_with_token() {
307+
if [ -z"$1" ];then
308+
return 1
309+
fi
310+
token_rc=0
311+
latest_tag_from_api "$1"|| token_rc=$?
312+
case"$token_rc"in
313+
0)
314+
output " [*] Using GitHub auth from $2""success"
315+
# The token is also used for the download.
316+
GITHUB_TOKEN="$1"
317+
;;
318+
1)
319+
output " [ ] Ignoring the GitHub token from $2, as GitHub rejected it""warning"
320+
;;
321+
*)
322+
output " [ ] Could not get the latest release from the GitHub API: ${api_error}""warning"
323+
;;
324+
esac
325+
return"$token_rc"
326+
}
327+
328+
# Get the latest release tag from the GitHub API, into $tag, using the first
329+
# token that GitHub accepts, or none. Unauthenticated API requests are limited
330+
# per IP address, which build environments often share.
331+
latest_tag_from_api_with_auth() {
332+
rc=0
333+
# The env variable comes first, as with the gh CLI itself.
334+
latest_tag_with_token "${GITHUB_TOKEN}""the GITHUB_TOKEN env variable"|| rc=$?
335+
if [ "$rc"= 1 ];then
336+
# Not sent with the download, if GitHub rejected it.
337+
GITHUB_TOKEN=""
338+
fi
339+
if [ "$rc"= 1 ] &&command -v gh >/dev/null 2>&1&& gh auth status >/dev/null 2>&1;then
340+
rc=0
341+
latest_tag_with_token "$(gh auth token 2>/dev/null || true)""the gh CLI"|| rc=$?
342+
fi
343+
auth_file="${HOME:-}/.global/auth.json"
344+
if [ "$rc"= 1 ] &&!command -v jq >/dev/null 2>&1;then
345+
if [ -n"${COMPOSER_AUTH:-}" ] || { [ -n"${HOME:-}" ] && [ -r"${auth_file}" ]; };then
346+
output " [ ] Composer auth was found, but jq is not installed to read a GitHub token from it""warning"
254347
fi
255-
elif [ !-z"${GITHUB_TOKEN}" ];then
256-
if! github_curl https://api.github.com/repos/upsun/cli/releases/latest >/dev/null 2>&1;then
257-
GITHUB_TOKEN=""
258-
else
259-
output " [*] Using GitHub auth from the GITHUB_TOKEN env variable""success"
348+
elif [ "$rc"= 1 ];then
349+
if[ -n"${COMPOSER_AUTH:-}" ];then
350+
rc=0
351+
latest_tag_with_token "$(printf '%s'"${COMPOSER_AUTH}"| github_token_from_composer_auth)" \
352+
"the COMPOSER_AUTH env variable"|| rc=$?
260353
fi
354+
# The token that Upsun provides in project containers. It allows for
355+
# higher rate limits but is otherwise unprivileged.
356+
if [ "$rc"= 1 ] && [ -n"${HOME:-}" ] && [ -r"${auth_file}" ];then
357+
rc=0
358+
latest_tag_with_token "$(github_token_from_composer_auth <"${auth_file}")""${auth_file}"|| rc=$?
359+
fi
360+
fi
361+
case"$rc"in
362+
0) return 0 ;;
363+
2) return 1 ;; # Another token would not help.
364+
esac
365+
366+
if latest_tag_from_api;then
367+
return 0
261368
fi
369+
output " [ ] Could not get the latest release from the GitHub API: ${api_error}""warning"
370+
case"$api_error"in
371+
*"HTTP 403"*|*"HTTP 429"*)
372+
output " Unauthenticated requests are rate limited: set GITHUB_TOKEN to use a token""comment"
373+
;;
374+
esac
375+
return 1
262376
}
263377

264378
# Check that Gzip is installed
@@ -283,7 +397,8 @@ check_ca_certificates() {
283397

284398
check_version() {
285399
if [ -z"${VERSION}" ];then
286-
tag=$(github_curl https://api.github.com/repos/upsun/cli/releases/latest 2>/dev/null | sed -n 's/.*"tag_name"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/p'| head -n 1)
400+
tag=""
401+
latest_tag_from_redirect || latest_tag_from_api_with_auth ||true
287402
else
288403
tag=${VERSION}
289404
fi
@@ -821,9 +936,6 @@ check_architecture
821936
check_install_method
822937
if [ "raw"="${INSTALL_METHOD}" ];then
823938
check_curl
824-
if [ -z"${VERSION}" ];then
825-
setup_github_token
826-
fi
827939
check_version
828940
check_gzip
829941
check_shasum

0 commit comments

Comments
 (0)