Menu

Fixing WordPress REST API on InfinityFree: TLS, aes.js and stripped Authorization
📰

Fixing WordPress REST API on InfinityFree: TLS, aes.js and stripped Authorization

DEV Community: authentication·Mk Aamir·about 15 hours ago
#kQnEfDTH
Reading 0:00
15s threshold

Mk Aamir

Publishing to WordPress on free hosting (InfinityFree) is not blocked - it just has three hidden hurdles:

  1. Incomplete TLS chain - the server omits the intermediate certificate, so OpenSSL reports 'unable to get local issuer certificate'.
  2. The openresty aes.js challenge - non-browser clients get a JavaScript page that computes a cookie; until it is set the connection is reset (curl code 000).
  3. The Authorization header is stripped - Application Passwords can never authenticate, so the REST API always answers rest_not_logged_in.

The fix: rebuild the CA bundle with the missing intermediate, solve the AES cookie challenge in Python, and authenticate through wp-login.php with the resulting cookie plus the REST nonce. Full working client in the thread.